commit 3ab21383b1c2a3c490146b7c88d1d49ec616acd4 Author: Kailash Nadh Date: Thu Oct 25 19:21:47 2018 +0530 Fresh start diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7756e36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +frontend/node_modules/ +frontend/my/node_modules/ +frontend/.cache/ +frontend/yarn.lock +.vscode/ + +config.toml \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..86eacf4 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +BIN := listmonk + +HASH := $(shell git rev-parse --short HEAD) +COMMIT_DATE := $(shell git show -s --format=%ci ${HASH}) +BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S') +VERSION := ${HASH} (${COMMIT_DATE}) + +build: + go build -o ${BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'" + +test: + go test + +clean: + go clean + - rm -f ${BIN} diff --git a/admin.go b/admin.go new file mode 100644 index 0000000..4111e04 --- /dev/null +++ b/admin.go @@ -0,0 +1,13 @@ +package main + +import ( + "net/http" + + "github.com/labstack/echo" +) + +// handleGetStats returns a collection of general statistics. +func handleGetStats(c echo.Context) error { + app := c.Get("app").(*App) + return c.JSON(http.StatusOK, okResp{app.Runner.GetMessengerNames()}) +} diff --git a/campaigns.go b/campaigns.go new file mode 100644 index 0000000..20d7b82 --- /dev/null +++ b/campaigns.go @@ -0,0 +1,443 @@ +package main + +import ( + "bytes" + "database/sql" + "errors" + "fmt" + "net/http" + "regexp" + "strconv" + "time" + + "github.com/asaskevich/govalidator" + "github.com/knadh/listmonk/models" + "github.com/knadh/listmonk/runner" + "github.com/labstack/echo" + "github.com/lib/pq" + uuid "github.com/satori/go.uuid" + null "gopkg.in/volatiletech/null.v6" +) + +// campaignReq is a wrapper over the Campaign model. +type campaignReq struct { + models.Campaign + MessengerID string `json:"messenger"` + Lists pq.Int64Array `json:"lists"` +} + +type campaignStats struct { + ID int `db:"id" json:"id"` + Status string `db:"status" json:"status"` + ToSend int `db:"to_send" json:"to_send"` + Sent int `db:"sent" json:"sent"` + Started null.Time `db:"started_at" json:"started_at"` + UpdatedAt null.Time `db:"updated_at" json:"updated_at"` + Rate float64 `json:"rate"` +} + +var regexFromAddress = regexp.MustCompile(`(.+?)\s<(.+?)@(.+?)>`) + +// handleGetCampaigns handles retrieval of campaigns. +func handleGetCampaigns(c echo.Context) error { + var ( + app = c.Get("app").(*App) + pg = getPagination(c.QueryParams()) + out models.Campaigns + + id, _ = strconv.Atoi(c.Param("id")) + status = c.FormValue("status") + single = false + noBody, _ = strconv.ParseBool(c.QueryParam("no_body")) + ) + + // Fetch one list. + if id > 0 { + single = true + } + + err := app.Queries.GetCampaigns.Select(&out, id, status, pg.Offset, pg.Limit) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaigns: %s", pqErrMsg(err))) + } else if single && len(out) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } else if len(out) == 0 { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + for i := 0; i < len(out); i++ { + // Replace null tags. + if out[i].Tags == nil { + out[i].Tags = make(pq.StringArray, 0) + } + + if noBody { + out[i].Body = "" + } + } + + if single { + return c.JSON(http.StatusOK, okResp{out[0]}) + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handlePreviewTemplate renders the HTML preview of a campaign body. +func handlePreviewCampaign(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + camps models.Campaigns + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + err := app.Queries.GetCampaigns.Select(&camps, id, "", 0, 1) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaign: %s", pqErrMsg(err))) + } else if len(camps) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + var ( + camp = camps[0] + sub models.Subscriber + ) + + // Get a random subscriber from the campaign. + if err := app.Queries.GetOneCampaignSubscriber.Get(&sub, camp.ID); err != nil { + if err == sql.ErrNoRows { + // There's no subscriber. Mock one. + sub = models.Subscriber{ + Name: "Dummy Subscriber", + Email: "dummy@subscriber.com", + UUID: "00000000-0000-0000-0000-000000000000", + Status: models.SubscriberStatusEnabled, + } + } else { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching subscriber: %s", pqErrMsg(err))) + } + } + + // Compile the template. + tpl, err := runner.CompileMessageTemplate(`{{ template "content" . }}`, camp.Body) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Error compiling template: %v", err)) + } + + // Render the message body. + var out = bytes.Buffer{} + if err := tpl.ExecuteTemplate(&out, + runner.BaseTPL, + runner.Message{Campaign: &camp, Subscriber: &sub, UnsubscribeURL: "#dummy"}); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Error executing template: %v", err)) + } + + return c.HTML(http.StatusOK, out.String()) +} + +// handleCreateCampaign handles campaign creation. +// Newly created campaigns are always drafts. +func handleCreateCampaign(c echo.Context) error { + var ( + app = c.Get("app").(*App) + o campaignReq + ) + + if err := c.Bind(&o); err != nil { + return err + } + + // Validate. + if err := validateCampaignFields(o); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, err.Error()) + } + + if !app.Runner.HasMessenger(o.MessengerID) { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Unknown messenger %s", o.MessengerID)) + } + + // Insert and read ID. + var newID int + if err := app.Queries.CreateCampaign.Get(&newID, + uuid.NewV4(), + o.Name, + o.Subject, + o.FromEmail, + o.Body, + o.ContentType, + o.SendAt, + pq.StringArray(normalizeTags(o.Tags)), + "email", + o.TemplateID, + o.Lists, + ); err != nil { + if err == sql.ErrNoRows { + return echo.NewHTTPError(http.StatusBadRequest, + "There aren't any subscribers in the target lists to create the campaign.") + } + + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error creating campaign: %v", pqErrMsg(err))) + } + + // Hand over to the GET handler to return the last insertion. + c.SetParamNames("id") + c.SetParamValues(fmt.Sprintf("%d", newID)) + + return handleGetCampaigns(c) +} + +// handleUpdateCampaign handles campaign modification. +// Campaigns that are done cannot be modified. +func handleUpdateCampaign(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + var cm models.Campaign + if err := app.Queries.GetCampaigns.Get(&cm, id, "", 0, 1); err != nil { + if err == sql.ErrNoRows { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaign: %s", pqErrMsg(err))) + } + + if isCampaignalMutable(cm.Status) { + return echo.NewHTTPError(http.StatusBadRequest, + "Cannot update a running or a finished campaign.") + } + + // Incoming params. + var o campaignReq + if err := c.Bind(&o); err != nil { + return err + } + + if err := validateCampaignFields(o); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, err.Error()) + } + + res, err := app.Queries.UpdateCampaign.Exec(cm.ID, + o.Name, + o.Subject, + o.FromEmail, + o.Body, + o.ContentType, + o.SendAt, + pq.StringArray(normalizeTags(o.Tags)), + o.TemplateID, + o.Lists) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error updating campaign: %s", pqErrMsg(err))) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + return handleGetCampaigns(c) +} + +// handleUpdateCampaignStatus handles campaign status modification. +func handleUpdateCampaignStatus(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + var cm models.Campaign + if err := app.Queries.GetCampaigns.Get(&cm, id, "", 0, 1); err != nil { + if err == sql.ErrNoRows { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaign: %s", pqErrMsg(err))) + } + + // Incoming params. + var o campaignReq + if err := c.Bind(&o); err != nil { + return err + } + + errMsg := "" + switch o.Status { + case models.CampaignStatusDraft: + if cm.Status != models.CampaignStatusScheduled { + errMsg = "Only scheduled campaigns can be saved as drafts" + } + case models.CampaignStatusScheduled: + if cm.Status != models.CampaignStatusDraft { + errMsg = "Only draft campaigns can be scheduled" + } + if !cm.SendAt.Valid { + errMsg = "Campaign needs a `send_at` date to be scheduled" + } + + case models.CampaignStatusRunning: + if cm.Status != models.CampaignStatusPaused && cm.Status != models.CampaignStatusDraft { + errMsg = "Only paused campaigns and drafts can be started" + } + case models.CampaignStatusPaused: + if cm.Status != models.CampaignStatusRunning { + errMsg = "Only active campaigns can be paused" + } + case models.CampaignStatusCancelled: + if cm.Status != models.CampaignStatusRunning && cm.Status != models.CampaignStatusPaused { + errMsg = "Only active campaigns can be cancelled" + } + } + + if len(errMsg) > 0 { + return echo.NewHTTPError(http.StatusBadRequest, errMsg) + } + + res, err := app.Queries.UpdateCampaignStatus.Exec(cm.ID, o.Status) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error updating campaign: %s", pqErrMsg(err))) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + return handleGetCampaigns(c) +} + +// handleDeleteCampaign handles campaign deletion. +// Only scheduled campaigns that have not started yet can be deleted. +func handleDeleteCampaign(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + var cm models.Campaign + if err := app.Queries.GetCampaigns.Get(&cm, id, "", 0, 1); err != nil { + if err == sql.ErrNoRows { + return echo.NewHTTPError(http.StatusBadRequest, "Campaign not found.") + } + + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaign: %s", pqErrMsg(err))) + } + + // Only scheduled campaigns can be deleted. + if cm.Status != models.CampaignStatusDraft && + cm.Status != models.CampaignStatusScheduled { + return echo.NewHTTPError(http.StatusBadRequest, + "Only campaigns that haven't been started can be deleted.") + } + + if _, err := app.Queries.DeleteCampaign.Exec(cm.ID); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error deleting campaign: %v", pqErrMsg(err))) + } + + return c.JSON(http.StatusOK, okResp{true}) +} + +// handleGetRunningCampaignStats returns stats of a given set of campaign IDs. +func handleGetRunningCampaignStats(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out []campaignStats + ) + + if err := app.Queries.GetCampaignStats.Select(&out, models.CampaignStatusRunning); err != nil { + if err == sql.ErrNoRows { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching campaign stats: %s", pqErrMsg(err))) + } else if len(out) == 0 { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + // Compute rate. + for i, c := range out { + if c.Started.Valid && c.UpdatedAt.Valid { + diff := c.UpdatedAt.Time.Sub(c.Started.Time).Minutes() + if diff > 0 { + out[i].Rate = float64(c.Sent) / diff + + t := float64(c.ToSend) + if out[i].Rate > t { + out[i].Rate = t + } + } + } + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handleGetCampaignMessengers returns the list of registered messengers. +func handleGetCampaignMessengers(c echo.Context) error { + app := c.Get("app").(*App) + return c.JSON(http.StatusOK, okResp{app.Runner.GetMessengerNames()}) +} + +// validateCampaignFields validates incoming campaign field values. +func validateCampaignFields(c campaignReq) error { + if !regexFromAddress.Match([]byte(c.FromEmail)) { + if !govalidator.IsEmail(c.FromEmail) { + return errors.New("invalid `from_email`") + } + } + + if !govalidator.IsByteLength(c.Name, 1, stdInputMaxLen) { + return errors.New("invalid length for `name`") + } + if !govalidator.IsByteLength(c.Subject, 1, stdInputMaxLen) { + return errors.New("invalid length for `subject`") + } + + // if !govalidator.IsByteLength(c.Body, 1, bodyMaxLen) { + // return errors.New("invalid length for `body`") + // } + + // If there's a "send_at" date, it should be in the future. + if c.SendAt.Valid { + if c.SendAt.Time.Before(time.Now()) { + return errors.New("`send_at` date should be in the future") + } + } + + return nil +} + +// isCampaignalMutable tells if a campaign's in a state where it's +// properties can be mutated. +func isCampaignalMutable(status string) bool { + return status == models.CampaignStatusRunning || + status == models.CampaignStatusCancelled || + status == models.CampaignStatusFinished +} diff --git a/config.toml.sample b/config.toml.sample new file mode 100644 index 0000000..2d3bf91 --- /dev/null +++ b/config.toml.sample @@ -0,0 +1,73 @@ +# Application. +[app] +# Interface and port where the app will run its webserver. +address = "0.0.0.0:9000" + +# Root to the listmonk installation that'll be used in the e-mails for linking to +# images, the unsubscribe URL etc. +root = "http://listmonk.mysite.com" + +# The default 'from' e-mail for outgoing e-mail campaigns. +from_email = "listmonk " + +# Path to the uploads directory where media will be uploaded. +upload_path = "uploads" + +# Upload URI that's visible to the outside world. The media +# uploaded to upload_path will be made available publicly +# under this URI, for instance, list.yoursite.com/uploads. +upload_uri = "/uploads" + +# Directory where the app's static assets are stored (index.html, ./static etc.) +asset_path = "frontend/my/build" + +# Maximum concurrent workers that will attempt to send messages +# simultaneously. This should depend on the number of CPUs the +# machine has and also the number of simultaenous e-mails the +# mail server will +concurrency = 100 + +# Database. +[db] +host = "localhost" +port = 5432 +user = "listmonk" +password = "" +database = "listmonk" + +# TQekh4quVgGc3HQ + + +# SMTP servers. +[smtp] + [smtp.my0] + enabled = true + host = "my.smtp.server" + port = "25" + + # cram or plain. + auth_protocol = "cram" + username = "xxxxx" + password = "" + + # Maximum time (milliseconds) to wait per e-mail push. + send_timeout = 5000 + + # Maximum concurrent connections to the SMTP server. + max_conns = 10 + + [smtp.postal] + enabled = false + host = "my.smtp.server2" + port = "25" + + # cram or plain. + auth_protocol = "plain" + username = "xxxxx" + password = "" + + # Maximum time (milliseconds) to wait per e-mail push. + send_timeout = 5000 + + # Maximum concurrent connections to the SMTP server. + max_conns = 10 diff --git a/default-template.html b/default-template.html new file mode 100644 index 0000000..0ed44ec --- /dev/null +++ b/default-template.html @@ -0,0 +1,52 @@ + + + + + + + + + +
+ {{ template "content" . }} +
+ + + + + \ No newline at end of file diff --git a/frontend/.babelrc b/frontend/.babelrc new file mode 100644 index 0000000..235b076 --- /dev/null +++ b/frontend/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["env", "react"], + "plugins": [["transform-react-jsx", { "pragma": "h" }]] +} diff --git a/frontend/my/.gitignore b/frontend/my/.gitignore new file mode 100644 index 0000000..d30f40e --- /dev/null +++ b/frontend/my/.gitignore @@ -0,0 +1,21 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/frontend/my/README.md b/frontend/my/README.md new file mode 100644 index 0000000..479d632 --- /dev/null +++ b/frontend/my/README.md @@ -0,0 +1,2444 @@ +This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). + +Below you will find some information on how to perform common tasks.
+You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md). + +## Table of Contents + +- [Updating to New Releases](#updating-to-new-releases) +- [Sending Feedback](#sending-feedback) +- [Folder Structure](#folder-structure) +- [Available Scripts](#available-scripts) + - [npm start](#npm-start) + - [npm test](#npm-test) + - [npm run build](#npm-run-build) + - [npm run eject](#npm-run-eject) +- [Supported Browsers](#supported-browsers) +- [Supported Language Features and Polyfills](#supported-language-features-and-polyfills) +- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor) +- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) +- [Debugging in the Editor](#debugging-in-the-editor) +- [Formatting Code Automatically](#formatting-code-automatically) +- [Changing the Page ``](#changing-the-page-title) +- [Installing a Dependency](#installing-a-dependency) +- [Importing a Component](#importing-a-component) +- [Code Splitting](#code-splitting) +- [Adding a Stylesheet](#adding-a-stylesheet) +- [Post-Processing CSS](#post-processing-css) +- [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) +- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files) +- [Using the `public` Folder](#using-the-public-folder) + - [Changing the HTML](#changing-the-html) + - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system) + - [When to Use the `public` Folder](#when-to-use-the-public-folder) +- [Using Global Variables](#using-global-variables) +- [Adding Bootstrap](#adding-bootstrap) + - [Using a Custom Theme](#using-a-custom-theme) +- [Adding Flow](#adding-flow) +- [Adding a Router](#adding-a-router) +- [Adding Custom Environment Variables](#adding-custom-environment-variables) + - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html) + - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell) + - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env) +- [Can I Use Decorators?](#can-i-use-decorators) +- [Fetching Data with AJAX Requests](#fetching-data-with-ajax-requests) +- [Integrating with an API Backend](#integrating-with-an-api-backend) + - [Node](#node) + - [Ruby on Rails](#ruby-on-rails) +- [Proxying API Requests in Development](#proxying-api-requests-in-development) + - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) + - [Configuring the Proxy Manually](#configuring-the-proxy-manually) + - [Configuring a WebSocket Proxy](#configuring-a-websocket-proxy) +- [Using HTTPS in Development](#using-https-in-development) +- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) +- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) +- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page) +- [Running Tests](#running-tests) + - [Filename Conventions](#filename-conventions) + - [Command Line Interface](#command-line-interface) + - [Version Control Integration](#version-control-integration) + - [Writing Tests](#writing-tests) + - [Testing Components](#testing-components) + - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries) + - [Initializing Test Environment](#initializing-test-environment) + - [Focusing and Excluding Tests](#focusing-and-excluding-tests) + - [Coverage Reporting](#coverage-reporting) + - [Continuous Integration](#continuous-integration) + - [Disabling jsdom](#disabling-jsdom) + - [Snapshot Testing](#snapshot-testing) + - [Editor Integration](#editor-integration) +- [Debugging Tests](#debugging-tests) + - [Debugging Tests in Chrome](#debugging-tests-in-chrome) + - [Debugging Tests in Visual Studio Code](#debugging-tests-in-visual-studio-code) +- [Developing Components in Isolation](#developing-components-in-isolation) + - [Getting Started with Storybook](#getting-started-with-storybook) + - [Getting Started with Styleguidist](#getting-started-with-styleguidist) +- [Publishing Components to npm](#publishing-components-to-npm) +- [Making a Progressive Web App](#making-a-progressive-web-app) + - [Opting Out of Caching](#opting-out-of-caching) + - [Offline-First Considerations](#offline-first-considerations) + - [Progressive Web App Metadata](#progressive-web-app-metadata) +- [Analyzing the Bundle Size](#analyzing-the-bundle-size) +- [Deployment](#deployment) + - [Static Server](#static-server) + - [Other Solutions](#other-solutions) + - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing) + - [Building for Relative Paths](#building-for-relative-paths) + - [Azure](#azure) + - [Firebase](#firebase) + - [GitHub Pages](#github-pages) + - [Heroku](#heroku) + - [Netlify](#netlify) + - [Now](#now) + - [S3 and CloudFront](#s3-and-cloudfront) + - [Surge](#surge) +- [Advanced Configuration](#advanced-configuration) +- [Troubleshooting](#troubleshooting) + - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes) + - [`npm test` hangs on macOS Sierra](#npm-test-hangs-on-macos-sierra) + - [`npm run build` exits too early](#npm-run-build-exits-too-early) + - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku) + - [`npm run build` fails to minify](#npm-run-build-fails-to-minify) + - [Moment.js locales are missing](#momentjs-locales-are-missing) +- [Alternatives to Ejecting](#alternatives-to-ejecting) +- [Something Missing?](#something-missing) + +## Updating to New Releases + +Create React App is divided into two packages: + +* `create-react-app` is a global command-line utility that you use to create new projects. +* `react-scripts` is a development dependency in the generated projects (including this one). + +You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`. + +When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. + +To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. + +In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. + +We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. + +## Sending Feedback + +We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). + +## Folder Structure + +After creation, your project should look like this: + +``` +my-app/ + README.md + node_modules/ + package.json + public/ + index.html + favicon.ico + src/ + App.css + App.js + App.test.js + index.css + index.js + logo.svg +``` + +For the project to build, **these files must exist with exact filenames**: + +* `public/index.html` is the page template; +* `src/index.js` is the JavaScript entry point. + +You can delete or rename the other files. + +You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br> +You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them. + +Only files inside `public` can be used from `public/index.html`.<br> +Read instructions below for using assets from JavaScript and HTML. + +You can, however, create more top-level directories.<br> +They will not be included in the production build so you can use them for things like documentation. + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.<br> +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.<br> +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.<br> +See the section about [running tests](#running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.<br> +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.<br> +Your app is ready to be deployed! + +See the section about [deployment](#deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Supported Browsers + +By default, the generated project uses the latest version of React. + +You can refer [to the React documentation](https://reactjs.org/docs/react-dom.html#browser-support) for more information about supported browsers. + +## Supported Language Features and Polyfills + +This project supports a superset of the latest JavaScript standard.<br> +In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports: + +* [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). +* [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). +* [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). +* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) +* [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal). +* [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. + +Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-). + +While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future. + +Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**: + +* [`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign). +* [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise). +* [`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch). + +If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them. + +Also note that using some newer syntax features like `for...of` or `[...nonArrayValue]` causes Babel to emit code that depends on ES6 runtime features and might not work without a polyfill. When in doubt, use [Babel REPL](https://babeljs.io/repl/) to see what any specific syntax compiles down to. + +## Syntax Highlighting in the Editor + +To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered. + +## Displaying Lint Output in the Editor + +>Note: this feature is available with `react-scripts@0.2.0` and higher.<br> +>It also only works with npm 3 or higher. + +Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. + +They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. + +You would need to install an ESLint plugin for your editor first. Then, add a file called `.eslintrc` to the project root: + +```js +{ + "extends": "react-app" +} +``` + +Now your editor should report the linting warnings. + +Note that even if you edit your `.eslintrc` file further, these changes will **only affect the editor integration**. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes. + +If you want to enforce a coding style for your project, consider using [Prettier](https://github.com/jlongster/prettier) instead of ESLint style rules. + +## Debugging in the Editor + +**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) and [WebStorm](https://www.jetbrains.com/webstorm/).** + +Visual Studio Code and WebStorm support debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools. + +### Visual Studio Code + +You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed. + +Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory. + +```json +{ + "version": "0.2.0", + "configurations": [{ + "name": "Chrome", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceRoot}/src", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + }] +} +``` +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor. + +Having problems with VS Code Debugging? Please see their [troubleshooting guide](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#troubleshooting). + +### WebStorm + +You would need to have [WebStorm](https://www.jetbrains.com/webstorm/) and [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji) Chrome extension installed. + +In the WebStorm menu `Run` select `Edit Configurations...`. Then click `+` and select `JavaScript Debug`. Paste `http://localhost:3000` into the URL field and save the configuration. + +>Note: the URL may be different if you've made adjustments via the [HOST or PORT environment variables](#advanced-configuration). + +Start your app by running `npm start`, then press `^D` on macOS or `F9` on Windows and Linux or click the green debug icon to start debugging in WebStorm. + +The same way you can debug your application in IntelliJ IDEA Ultimate, PhpStorm, PyCharm Pro, and RubyMine. + +## Formatting Code Automatically + +Prettier is an opinionated code formatter with support for JavaScript, CSS and JSON. With Prettier you can format the code you write automatically to ensure a code style within your project. See the [Prettier's GitHub page](https://github.com/prettier/prettier) for more information, and look at this [page to see it in action](https://prettier.github.io/prettier/). + +To format our code whenever we make a commit in git, we need to install the following dependencies: + +```sh +npm install --save husky lint-staged prettier +``` + +Alternatively you may use `yarn`: + +```sh +yarn add husky lint-staged prettier +``` + +* `husky` makes it easy to use githooks as if they are npm scripts. +* `lint-staged` allows us to run scripts on staged files in git. See this [blog post about lint-staged to learn more about it](https://medium.com/@okonetchnikov/make-linting-great-again-f3890e1ad6b8). +* `prettier` is the JavaScript formatter we will run before commits. + +Now we can make sure every file is formatted correctly by adding a few lines to the `package.json` in the project root. + +Add the following line to `scripts` section: + +```diff + "scripts": { ++ "precommit": "lint-staged", + "start": "react-scripts start", + "build": "react-scripts build", +``` + +Next we add a 'lint-staged' field to the `package.json`, for example: + +```diff + "dependencies": { + // ... + }, ++ "lint-staged": { ++ "src/**/*.{js,jsx,json,css}": [ ++ "prettier --single-quote --write", ++ "git add" ++ ] ++ }, + "scripts": { +``` + +Now, whenever you make a commit, Prettier will format the changed files automatically. You can also run `./node_modules/.bin/prettier --single-quote --write "src/**/*.{js,jsx,json,css}"` to format your entire project for the first time. + +Next you might want to integrate Prettier in your favorite editor. Read the section on [Editor Integration](https://prettier.io/docs/en/editors.html) on the Prettier GitHub page. + +## Changing the Page `<title>` + +You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. + +Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](#adding-a-stylesheet) is done without touching the HTML. + +If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. + +If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](#pre-rendering-into-static-html-files). + +## Installing a Dependency + +The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: + +```sh +npm install --save react-router +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-router +``` + +This works for any library, not just `react-router`. + +## Importing a Component + +This project setup supports ES6 modules thanks to Babel.<br> +While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. + +For example: + +### `Button.js` + +```js +import React, { Component } from 'react'; + +class Button extends Component { + render() { + // ... + } +} + +export default Button; // Don’t forget to use export default! +``` + +### `DangerButton.js` + + +```js +import React, { Component } from 'react'; +import Button from './Button'; // Import a component from another file + +class DangerButton extends Component { + render() { + return <Button color="red" />; + } +} + +export default DangerButton; +``` + +Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. + +We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. + +Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. + +Learn more about ES6 modules: + +* [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) +* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) +* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) + +## Code Splitting + +Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. + +This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. + +Here is an example: + +### `moduleA.js` + +```js +const moduleA = 'Hello'; + +export { moduleA }; +``` +### `App.js` + +```js +import React, { Component } from 'react'; + +class App extends Component { + handleClick = () => { + import('./moduleA') + .then(({ moduleA }) => { + // Use moduleA + }) + .catch(err => { + // Handle failure + }); + }; + + render() { + return ( + <div> + <button onClick={this.handleClick}>Load</button> + </div> + ); + } +} + +export default App; +``` + +This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. + +You can also use it with `async` / `await` syntax if you prefer it. + +### With React Router + +If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app). + +Also check out the [Code Splitting](https://reactjs.org/docs/code-splitting.html) section in React documentation. + +## Adding a Stylesheet + +This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: + +### `Button.css` + +```css +.Button { + padding: 20px; +} +``` + +### `Button.js` + +```js +import React, { Component } from 'react'; +import './Button.css'; // Tell Webpack that Button.js uses these styles + +class Button extends Component { + render() { + // You can use them as regular CSS styles + return <div className="Button" />; + } +} +``` + +**This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. + +In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. + +If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. + +## Post-Processing CSS + +This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. + +For example, this: + +```css +.App { + display: flex; + flex-direction: row; + align-items: center; +} +``` + +becomes this: + +```css +.App { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} +``` + +If you need to disable autoprefixing for some reason, [follow this section](https://github.com/postcss/autoprefixer#disabling). + +## Adding a CSS Preprocessor (Sass, Less etc.) + +Generally, we recommend that you don’t reuse the same CSS classes across different components. For example, instead of using a `.Button` CSS class in `<AcceptButton>` and `<RejectButton>` components, we recommend creating a `<Button>` component with its own `.Button` styles, that both `<AcceptButton>` and `<RejectButton>` can render (but [not inherit](https://facebook.github.io/react/docs/composition-vs-inheritance.html)). + +Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable. In this walkthrough, we will be using Sass, but you can also use Less, or another alternative. + +First, let’s install the command-line interface for Sass: + +```sh +npm install --save node-sass-chokidar +``` + +Alternatively you may use `yarn`: + +```sh +yarn add node-sass-chokidar +``` + +Then in `package.json`, add the following lines to `scripts`: + +```diff + "scripts": { ++ "build-css": "node-sass-chokidar src/ -o src/", ++ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test --env=jsdom", +``` + +>Note: To use a different preprocessor, replace `build-css` and `watch-css` commands according to your preprocessor’s documentation. + +Now you can rename `src/App.css` to `src/App.scss` and run `npm run watch-css`. The watcher will find every Sass file in `src` subdirectories, and create a corresponding CSS file next to it, in our case overwriting `src/App.css`. Since `src/App.js` still imports `src/App.css`, the styles become a part of your application. You can now edit `src/App.scss`, and `src/App.css` will be regenerated. + +To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions. + +To enable importing files without using relative paths, you can add the `--include-path` option to the command in `package.json`. + +``` +"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/", +"watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive", +``` + +This will allow you to do imports like + +```scss +@import 'styles/_colors.scss'; // assuming a styles directory under src/ +@import 'nprogress/nprogress'; // importing a css file from the nprogress node module +``` + +At this point you might want to remove all CSS files from the source control, and add `src/**/*.css` to your `.gitignore` file. It is generally a good practice to keep the build products outside of the source control. + +As a final step, you may find it convenient to run `watch-css` automatically with `npm start`, and run `build-css` as a part of `npm run build`. You can use the `&&` operator to execute two scripts sequentially. However, there is no cross-platform way to run two scripts in parallel, so we will install a package for this: + +```sh +npm install --save npm-run-all +``` + +Alternatively you may use `yarn`: + +```sh +yarn add npm-run-all +``` + +Then we can change `start` and `build` scripts to include the CSS preprocessor commands: + +```diff + "scripts": { + "build-css": "node-sass-chokidar src/ -o src/", + "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", +- "start": "react-scripts start", +- "build": "react-scripts build", ++ "start-js": "react-scripts start", ++ "start": "npm-run-all -p watch-css start-js", ++ "build-js": "react-scripts build", ++ "build": "npm-run-all build-css build-js", + "test": "react-scripts test --env=jsdom", + "eject": "react-scripts eject" + } +``` + +Now running `npm start` and `npm run build` also builds Sass files. + +**Why `node-sass-chokidar`?** + +`node-sass` has been reported as having the following issues: + +- `node-sass --watch` has been reported to have *performance issues* in certain conditions when used in a virtual machine or with docker. + +- Infinite styles compiling [#1939](https://github.com/facebookincubator/create-react-app/issues/1939) + +- `node-sass` has been reported as having issues with detecting new files in a directory [#1891](https://github.com/sass/node-sass/issues/1891) + + `node-sass-chokidar` is used here as it addresses these issues. + +## Adding Images, Fonts, and Files + +With Webpack, using static assets like images and fonts works similarly to CSS. + +You can **`import` a file right in a JavaScript module**. This tells Webpack to include that file in the bundle. Unlike CSS imports, importing a file gives you a string value. This value is the final path you can reference in your code, e.g. as the `src` attribute of an image or the `href` of a link to a PDF. + +To reduce the number of requests to the server, importing images that are less than 10,000 bytes returns a [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) instead of a path. This applies to the following file extensions: bmp, gif, jpg, jpeg, and png. SVG files are excluded due to [#1153](https://github.com/facebookincubator/create-react-app/issues/1153). + +Here is an example: + +```js +import React from 'react'; +import logo from './logo.png'; // Tell Webpack this JS file uses this image + +console.log(logo); // /logo.84287d09.png + +function Header() { + // Import result is the URL of your image + return <img src={logo} alt="Logo" />; +} + +export default Header; +``` + +This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths. + +This works in CSS too: + +```css +.Logo { + background-image: url(./logo.png); +} +``` + +Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. + +Please be advised that this is also a custom feature of Webpack. + +**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).<br> +An alternative way of handling static assets is described in the next section. + +## Using the `public` Folder + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +### Changing the HTML + +The `public` folder contains the HTML file so you can tweak it, for example, to [set the page title](#changing-the-page-title). +The `<script>` tag with the compiled code will be added to it automatically during the build process. + +### Adding Assets Outside of the Module System + +You can also add other assets to the `public` folder. + +Note that we normally encourage you to `import` assets in JavaScript files instead. +For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files). +This mechanism provides a number of benefits: + +* Scripts and stylesheets get minified and bundled together to avoid extra network requests. +* Missing files cause compilation errors instead of 404 errors for your users. +* Result filenames include content hashes so you don’t need to worry about browsers caching their old versions. + +However there is an **escape hatch** that you can use to add an asset outside of the module system. + +If you put a file into the `public` folder, it will **not** be processed by Webpack. Instead it will be copied into the build folder untouched. To reference assets in the `public` folder, you need to use a special variable called `PUBLIC_URL`. + +Inside `index.html`, you can use it like this: + +```html +<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> +``` + +Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. + +When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL. + +In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes: + +```js +render() { + // Note: this is an escape hatch and should be used sparingly! + // Normally we recommend using `import` for getting asset URLs + // as described in “Adding Images and Fonts” above this section. + return <img src={process.env.PUBLIC_URL + '/img/logo.png'} />; +} +``` + +Keep in mind the downsides of this approach: + +* None of the files in `public` folder get post-processed or minified. +* Missing files will not be called at compilation time, and will cause 404 errors for your users. +* Result filenames won’t include content hashes so you’ll need to add query arguments or rename them every time they change. + +### When to Use the `public` Folder + +Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript. +The `public` folder is useful as a workaround for a number of less common cases: + +* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest). +* You have thousands of images and need to dynamically reference their paths. +* You want to include a small script like [`pace.js`](http://github.hubspot.com/pace/docs/welcome/) outside of the bundled code. +* Some library may be incompatible with Webpack and you have no other option but to include it as a `<script>` tag. + +Note that if you add a `<script>` that declares global variables, you also need to read the next section on using them. + +## Using Global Variables + +When you include a script in the HTML file that defines global variables and try to use one of these variables in the code, the linter will complain because it cannot see the definition of the variable. + +You can avoid this by reading the global variable explicitly from the `window` object, for example: + +```js +const $ = window.$; +``` + +This makes it obvious you are using a global variable intentionally rather than because of a typo. + +Alternatively, you can force the linter to ignore any line by adding `// eslint-disable-line` after it. + +## Adding Bootstrap + +You don’t have to use [React Bootstrap](https://react-bootstrap.github.io) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: + +Install React Bootstrap and Bootstrap from npm. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: + +```sh +npm install --save react-bootstrap bootstrap@3 +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-bootstrap bootstrap@3 +``` + +Import Bootstrap CSS and optionally Bootstrap theme CSS in the beginning of your ```src/index.js``` file: + +```js +import 'bootstrap/dist/css/bootstrap.css'; +import 'bootstrap/dist/css/bootstrap-theme.css'; +// Put any other imports below so that CSS from your +// components takes precedence over default styles. +``` + +Import required React Bootstrap components within ```src/App.js``` file or your custom component files: + +```js +import { Navbar, Jumbotron, Button } from 'react-bootstrap'; +``` + +Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. + +### Using a Custom Theme + +Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent package).<br> +We suggest the following approach: + +* Create a new package that depends on the package you wish to customize, e.g. Bootstrap. +* Add the necessary build steps to tweak the theme, and publish your package on npm. +* Install your own theme npm package as a dependency of your app. + +Here is an example of adding a [customized Bootstrap](https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165) that follows these steps. + +## Adding Flow + +Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept. + +Recent versions of [Flow](http://flowtype.org/) work with Create React App projects out of the box. + +To add Flow to a Create React App project, follow these steps: + +1. Run `npm install --save flow-bin` (or `yarn add flow-bin`). +2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. +3. Run `npm run flow init` (or `yarn flow init`) to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). + +Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors. +You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience. +In the future we plan to integrate it into Create React App even more closely. + +To learn more about Flow, check out [its documentation](https://flowtype.org/). + +## Adding a Router + +Create React App doesn't prescribe a specific routing solution, but [React Router](https://reacttraining.com/react-router/) is the most popular one. + +To add it, run: + +```sh +npm install --save react-router-dom +``` + +Alternatively you may use `yarn`: + +```sh +yarn add react-router-dom +``` + +To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reacttraining.com/react-router/web/example/basic) is a good place to get started. + +Note that [you may need to configure your production server to support client-side routing](#serving-apps-with-client-side-routing) before deploying your app. + +## Adding Custom Environment Variables + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +Your project can consume variables declared in your environment as if they were declared locally in your JS files. By +default you will have `NODE_ENV` defined for you, and any other environment variables starting with +`REACT_APP_`. + +**The environment variables are embedded during the build time**. Since Create React App produces a static HTML/CSS/JS bundle, it can’t possibly read them at runtime. To read them at runtime, you would need to load HTML into memory on the server and replace placeholders in runtime, just like [described here](#injecting-data-from-the-server-into-the-page). Alternatively you can rebuild the app on the server anytime you change them. + +>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid accidentally [exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. + +These environment variables will be defined for you on `process.env`. For example, having an environment +variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`. + +There is also a special built-in environment variable called `NODE_ENV`. You can read it from `process.env.NODE_ENV`. When you run `npm start`, it is always equal to `'development'`, when you run `npm test` it is always equal to `'test'`, and when you run `npm run build` to make a production bundle, it is always equal to `'production'`. **You cannot override `NODE_ENV` manually.** This prevents developers from accidentally deploying a slow development build to production. + +These environment variables can be useful for displaying information conditionally based on where the project is +deployed or consuming sensitive data that lives outside of version control. + +First, you need to have environment variables defined. For example, let’s say you wanted to consume a secret defined +in the environment inside a `<form>`: + +```jsx +render() { + return ( + <div> + <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> + <form> + <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> + </form> + </div> + ); +} +``` + +During the build, `process.env.REACT_APP_SECRET_CODE` will be replaced with the current value of the `REACT_APP_SECRET_CODE` environment variable. Remember that the `NODE_ENV` variable will be set for you automatically. + +When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: + +```html +<div> + <small>You are running this application in <b>development</b> mode.</small> + <form> + <input type="hidden" value="abcdef" /> + </form> +</div> +``` + +The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this +value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in +a `.env` file. Both of these ways are described in the next few sections. + +Having access to the `NODE_ENV` is also useful for performing actions conditionally: + +```js +if (process.env.NODE_ENV !== 'production') { + analytics.disable(); +} +``` + +When you compile the app with `npm run build`, the minification step will strip out this condition, and the resulting bundle will be smaller. + +### Referencing Environment Variables in the HTML + +>Note: this feature is available with `react-scripts@0.9.0` and higher. + +You can also access the environment variables starting with `REACT_APP_` in the `public/index.html`. For example: + +```html +<title>%REACT_APP_WEBSITE_NAME% +``` + +Note that the caveats from the above section apply: + +* Apart from a few built-in variables (`NODE_ENV` and `PUBLIC_URL`), variable names must start with `REACT_APP_` to work. +* The environment variables are injected at build time. If you need to inject them at runtime, [follow this approach instead](#generating-dynamic-meta-tags-on-the-server). + +### Adding Temporary Environment Variables In Your Shell + +Defining environment variables can vary between OSes. It’s also important to know that this manner is temporary for the +life of the shell session. + +#### Windows (cmd.exe) + +```cmd +set "REACT_APP_SECRET_CODE=abcdef" && npm start +``` + +(Note: Quotes around the variable assignment are required to avoid a trailing whitespace.) + +#### Windows (Powershell) + +```Powershell +($env:REACT_APP_SECRET_CODE = "abcdef") -and (npm start) +``` + +#### Linux, macOS (Bash) + +```bash +REACT_APP_SECRET_CODE=abcdef npm start +``` + +### Adding Development Environment Variables In `.env` + +>Note: this feature is available with `react-scripts@0.5.0` and higher. + +To define permanent environment variables, create a file called `.env` in the root of your project: + +``` +REACT_APP_SECRET_CODE=abcdef +``` +>Note: You must create custom environment variables beginning with `REACT_APP_`. Any other variables except `NODE_ENV` will be ignored to avoid [accidentally exposing a private key on the machine that could have the same name](https://github.com/facebookincubator/create-react-app/issues/865#issuecomment-252199527). Changing any environment variables will require you to restart the development server if it is running. + +`.env` files **should be** checked into source control (with the exclusion of `.env*.local`). + +#### What other `.env` files can be used? + +>Note: this feature is **available with `react-scripts@1.0.0` and higher**. + +* `.env`: Default. +* `.env.local`: Local overrides. **This file is loaded for all environments except test.** +* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. +* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. + +Files on the left have more priority than files on the right: + +* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` +* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` +* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) + +These variables will act as the defaults if the machine does not explicitly set them.
+Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. + +>Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need +these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars). + +#### Expanding Environment Variables In `.env` + +>Note: this feature is available with `react-scripts@1.1.0` and higher. + +Expand variables already on your machine for use in your `.env` file (using [dotenv-expand](https://github.com/motdotla/dotenv-expand)). + +For example, to get the environment variable `npm_package_version`: + +``` +REACT_APP_VERSION=$npm_package_version +# also works: +# REACT_APP_VERSION=${npm_package_version} +``` + +Or expand variables local to the current `.env` file: + +``` +DOMAIN=www.example.com +REACT_APP_FOO=$DOMAIN/foo +REACT_APP_BAR=$DOMAIN/bar +``` + +## Can I Use Decorators? + +Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
+Create React App doesn’t support decorator syntax at the moment because: + +* It is an experimental proposal and is subject to change. +* The current specification version is not officially supported by Babel. +* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook. + +However in many cases you can rewrite decorator-based code without decorators just as fine.
+Please refer to these two threads for reference: + +* [#214](https://github.com/facebookincubator/create-react-app/issues/214) +* [#411](https://github.com/facebookincubator/create-react-app/issues/411) + +Create React App will add decorator support when the specification advances to a stable stage. + +## Fetching Data with AJAX Requests + +React doesn't prescribe a specific approach to data fetching, but people commonly use either a library like [axios](https://github.com/axios/axios) or the [`fetch()` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) provided by the browser. Conveniently, Create React App includes a polyfill for `fetch()` so you can use it without worrying about the browser support. + +The global `fetch` function allows to easily makes AJAX requests. It takes in a URL as an input and returns a `Promise` that resolves to a `Response` object. You can find more information about `fetch` [here](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch). + +This project also includes a [Promise polyfill](https://github.com/then/promise) which provides a full implementation of Promises/A+. A Promise represents the eventual result of an asynchronous operation, you can find more information about Promises [here](https://www.promisejs.org/) and [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). Both axios and `fetch()` use Promises under the hood. You can also use the [`async / await`](https://davidwalsh.name/async-await) syntax to reduce the callback nesting. + +You can learn more about making AJAX requests from React components in [the FAQ entry on the React website](https://reactjs.org/docs/faq-ajax.html). + +## Integrating with an API Backend + +These tutorials will help you to integrate your app with an API backend running on another port, +using `fetch()` to access it. + +### Node +Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). + +### Ruby on Rails + +Check out [this tutorial](https://www.fullstackreact.com/articles/how-to-get-create-react-app-to-work-with-your-rails-api/). +You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo-rails). + +## Proxying API Requests in Development + +>Note: this feature is available with `react-scripts@0.2.3` and higher. + +People often serve the front-end React app from the same host and port as their backend implementation.
+For example, a production setup might look like this after the app is deployed: + +``` +/ - static server returns index.html with React app +/todos - static server returns index.html with React app +/api/todos - server handles any /api/* requests using the backend implementation +``` + +Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. + +To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: + +```js + "proxy": "http://localhost:4000", +``` + +This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. The development server will **only** attempt to send requests without `text/html` in its `Accept` header to the proxy. + +Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: + +``` +Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. +``` + +Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`. + +The `proxy` option supports HTTP, HTTPS and WebSocket connections.
+If the `proxy` option is **not** flexible enough for you, alternatively you can: + +* [Configure the proxy yourself](#configuring-the-proxy-manually) +* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). +* Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. + +### "Invalid Host Header" Errors After Configuring Proxy + +When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). + +This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: + +>Invalid Host header + +To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: + +``` +HOST=mypublicdevhost.com +``` + +If you restart the development server now and load the app from the specified host, it should work. + +If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** + +``` +# NOTE: THIS IS DANGEROUS! +# It exposes your machine to attacks from the websites you visit. +DANGEROUSLY_DISABLE_HOST_CHECK=true +``` + +We don’t recommend this approach. + +### Configuring the Proxy Manually + +>Note: this feature is available with `react-scripts@1.0.0` and higher. + +If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
+You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. +```js +{ + // ... + "proxy": { + "/api": { + "target": "", + "ws": true + // ... + } + } + // ... +} +``` + +All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. + +If you need to specify multiple proxies, you may do so by specifying additional entries. +Matches are regular expressions, so that you can use a regexp to match multiple paths. +```js +{ + // ... + "proxy": { + // Matches any request starting with /api + "/api": { + "target": "", + "ws": true + // ... + }, + // Matches any request starting with /foo + "/foo": { + "target": "", + "ssl": true, + "pathRewrite": { + "^/foo": "/foo/beta" + } + // ... + }, + // Matches /bar/abc.html but not /bar/sub/def.html + "/bar/[^/]*[.]html": { + "target": "", + // ... + }, + // Matches /baz/abc.html and /baz/sub/def.html + "/baz/.*/.*[.]html": { + "target": "" + // ... + } + } + // ... +} +``` + +### Configuring a WebSocket Proxy + +When setting up a WebSocket proxy, there are a some extra considerations to be aware of. + +If you’re using a WebSocket engine like [Socket.io](https://socket.io/), you must have a Socket.io server running that you can use as the proxy target. Socket.io will not work with a standard WebSocket server. Specifically, don't expect Socket.io to work with [the websocket.org echo test](http://websocket.org/echo.html). + +There’s some good documentation available for [setting up a Socket.io server](https://socket.io/docs/). + +Standard WebSockets **will** work with a standard WebSocket server as well as the websocket.org echo test. You can use libraries like [ws](https://github.com/websockets/ws) for the server, with [native WebSockets in the browser](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). + +Either way, you can proxy WebSocket requests manually in `package.json`: + +```js +{ + // ... + "proxy": { + "/socket": { + // Your compatible WebSocket server + "target": "ws://", + // Tell http-proxy-middleware that this is a WebSocket proxy. + // Also allows you to proxy WebSocket requests without an additional HTTP request + // https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade + "ws": true + // ... + } + } + // ... +} +``` + +## Using HTTPS in Development + +>Note: this feature is available with `react-scripts@0.4.0` and higher. + +You may require the dev server to serve pages over HTTPS. One particular case where this could be useful is when using [the "proxy" feature](#proxying-api-requests-in-development) to proxy requests to an API server when that API server is itself serving HTTPS. + +To do this, set the `HTTPS` environment variable to `true`, then start the dev server as usual with `npm start`: + +#### Windows (cmd.exe) + +```cmd +set HTTPS=true&&npm start +``` + +#### Windows (Powershell) + +```Powershell +($env:HTTPS = $true) -and (npm start) +``` + +(Note: the lack of whitespace is intentional.) + +#### Linux, macOS (Bash) + +```bash +HTTPS=true npm start +``` + +Note that the server will use a self-signed certificate, so your web browser will almost definitely display a warning upon accessing the page. + +## Generating Dynamic `` Tags on the Server + +Since Create React App doesn’t support server rendering, you might be wondering how to make `` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: + +```html + + + + + +``` + +Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG_TITLE__`, `__OG_DESCRIPTION__`, and any other placeholders with values depending on the current URL. Just make sure to sanitize and escape the interpolated values so that they are safe to embed into HTML! + +If you use a Node server, you can even share the route matching logic between the client and the server. However duplicating it also works fine in simple cases. + +## Pre-Rendering into Static HTML Files + +If you’re hosting your `build` with a static hosting provider you can use [react-snapshot](https://www.npmjs.com/package/react-snapshot) or [react-snap](https://github.com/stereobooster/react-snap) to generate HTML pages for each route, or relative link, in your application. These pages will then seamlessly become active, or “hydrated”, when the JavaScript bundle has loaded. + +There are also opportunities to use this outside of static hosting, to take the pressure off the server when generating and caching routes. + +The primary benefit of pre-rendering is that you get the core content of each page _with_ the HTML payload—regardless of whether or not your JavaScript bundle successfully downloads. It also increases the likelihood that each route of your application will be picked up by search engines. + +You can read more about [zero-configuration pre-rendering (also called snapshotting) here](https://medium.com/superhighfives/an-almost-static-stack-6df0a2791319). + +## Injecting Data from the Server into the Page + +Similarly to the previous section, you can leave some placeholders in the HTML that inject global variables, for example: + +```js + + + + +``` + +Then, on the server, you can replace `__SERVER_DATA__` with a JSON of real data right before sending the response. The client code can then read `window.SERVER_DATA` to use it. **Make sure to [sanitize the JSON before sending it to the client](https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0) as it makes your app vulnerable to XSS attacks.** + +## Running Tests + +>Note: this feature is available with `react-scripts@0.3.0` and higher.
+>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030) + +Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try. + +Jest is a Node-based runner. This means that the tests always run in a Node environment and not in a real browser. This lets us enable fast iteration speed and prevent flakiness. + +While Jest provides browser globals such as `window` thanks to [jsdom](https://github.com/tmpvar/jsdom), they are only approximations of the real browser behavior. Jest is intended to be used for unit tests of your logic and your components rather than the DOM quirks. + +We recommend that you use a separate tool for browser end-to-end tests if you need them. They are beyond the scope of Create React App. + +### Filename Conventions + +Jest will look for test files with any of the following popular naming conventions: + +* Files with `.js` suffix in `__tests__` folders. +* Files with `.test.js` suffix. +* Files with `.spec.js` suffix. + +The `.test.js` / `.spec.js` files (or the `__tests__` folders) can be located at any depth under the `src` top level folder. + +We recommend to put the test files (or `__tests__` folders) next to the code they are testing so that relative imports appear shorter. For example, if `App.test.js` and `App.js` are in the same folder, the test just needs to `import App from './App'` instead of a long relative path. Colocation also helps find tests more quickly in larger projects. + +### Command Line Interface + +When you run `npm test`, Jest will launch in the watch mode. Every time you save a file, it will re-run the tests, just like `npm start` recompiles the code. + +The watcher includes an interactive command-line interface with the ability to run all tests, or focus on a search pattern. It is designed this way so that you can keep it open and enjoy fast re-runs. You can learn the commands from the “Watch Usage” note that the watcher prints after every run: + +![Jest watch mode](http://facebook.github.io/jest/img/blog/15-watch.gif) + +### Version Control Integration + +By default, when you run `npm test`, Jest will only run the tests related to files changed since the last commit. This is an optimization designed to make your tests run fast regardless of how many tests you have. However it assumes that you don’t often commit the code that doesn’t pass the tests. + +Jest will always explicitly mention that it only ran tests related to the files changed since the last commit. You can also press `a` in the watch mode to force Jest to run all tests. + +Jest will always run all tests on a [continuous integration](#continuous-integration) server or if the project is not inside a Git or Mercurial repository. + +### Writing Tests + +To create tests, add `it()` (or `test()`) blocks with the name of the test and its code. You may optionally wrap them in `describe()` blocks for logical grouping but this is neither required nor recommended. + +Jest provides a built-in `expect()` global function for making assertions. A basic test could look like this: + +```js +import sum from './sum'; + +it('sums numbers', () => { + expect(sum(1, 2)).toEqual(3); + expect(sum(2, 2)).toEqual(4); +}); +``` + +All `expect()` matchers supported by Jest are [extensively documented here](https://facebook.github.io/jest/docs/en/expect.html#content).
+You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](https://facebook.github.io/jest/docs/en/expect.html#tohavebeencalled) to create “spies” or mock functions. + +### Testing Components + +There is a broad spectrum of component testing techniques. They range from a “smoke test” verifying that a component renders without throwing, to shallow rendering and testing some of the output, to full rendering and testing component lifecycle and state changes. + +Different projects choose different testing tradeoffs based on how often components change, and how much logic they contain. If you haven’t decided on a testing strategy yet, we recommend that you start with creating simple smoke tests for your components: + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); +}); +``` + +This test mounts a component and makes sure that it didn’t throw during rendering. Tests like this provide a lot of value with very little effort so they are great as a starting point, and this is the test you will find in `src/App.test.js`. + +When you encounter bugs caused by changing components, you will gain a deeper insight into which parts of them are worth testing in your application. This might be a good time to introduce more specific tests asserting specific expected output or behavior. + +If you’d like to test components in isolation from the child components they render, we recommend using [`shallow()` rendering API](http://airbnb.io/enzyme/docs/api/shallow.html) from [Enzyme](http://airbnb.io/enzyme/). To install it, run: + +```sh +npm install --save enzyme enzyme-adapter-react-16 react-test-renderer +``` + +Alternatively you may use `yarn`: + +```sh +yarn add enzyme enzyme-adapter-react-16 react-test-renderer +``` + +As of Enzyme 3, you will need to install Enzyme along with an Adapter corresponding to the version of React you are using. (The examples above use the adapter for React 16.) + +The adapter will also need to be configured in your [global setup file](#initializing-test-environment): + +#### `src/setupTests.js` +```js +import { configure } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; + +configure({ adapter: new Adapter() }); +``` + +>Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it. [Read here](#initializing-test-environment) to learn how to add this after ejecting. + +Now you can write a smoke test with it: + +```js +import React from 'react'; +import { shallow } from 'enzyme'; +import App from './App'; + +it('renders without crashing', () => { + shallow(); +}); +``` + +Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `` and doesn’t go deeper. For example, even if `` itself renders a ` + + } + + + + + } + + { + this.setState({ quill: o }) + }} + onChange={ () => { + if(!this.state.quill) { + return + } + + this.props.setContent(this.state.contentType, this.state.quill.editor.root.innerHTML) + } } + /> + + { + if(!o) { + return + } + + this.setState({ rawInput: o.textAreaRef }) + }} + onChange={ (e) => { + this.props.setContent(this.state.contentType, e.target.value) + }} + /> + + ) + } +} + +class TheFormDef extends React.PureComponent { + state = { + editorVisible: false, + sendLater: false + } + + componentWillReceiveProps(nextProps) { + const has = nextProps.isSingle && nextProps.record.send_at !== null + if(!has) { + return + } + + if(this.state.sendLater !== has) { + this.setState({ sendLater: has }) + } + } + + validateEmail = (rule, value, callback) => { + if(!value.match(/(.+?)\s<(.+?)@(.+?)>/)) { + return callback("Format should be: Your Name ") + } + + callback() + } + + handleSendLater = (e) => { + this.setState({ sendLater: e }) + } + + // Handle create / edit form submission. + handleSubmit = (e) => { + e.preventDefault() + this.props.form.validateFields((err, values) => { + if (err) { + return + } + + if(!values.tags) { + values.tags = [] + } + + values.body = this.props.body + values.content_type = this.props.contentType + + // Create a new campaign. + if(!this.props.isSingle) { + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.CreateCampaign, cs.MethodPost, values).then((resp) => { + notification["success"]({ placement: "topRight", + message: "Campaign created", + description: `"${values["name"]}" created` }) + + this.props.route.history.push(cs.Routes.ViewCampaign.replace(":id", resp.data.data.id)) + this.props.fetchRecord(resp.data.data.id) + this.props.setCurrentTab("content") + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } else { + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.UpdateCampaign, cs.MethodPut, { ...values, id: this.props.record.id }).then((resp) => { + notification["success"]({ placement: "topRight", + message: "Campaign updated", + description: `"${values["name"]}" updated` }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + }) + } + + render() { + const { record } = this.props; + const { getFieldDecorator } = this.props.form + + let subLists = [] + if(this.props.isSingle && record.lists) { + subLists = record.lists.map((v) => { return v.id !== 0 ? v.id : null }).filter(v => v !== null) + } + + return ( +
+
+ + {getFieldDecorator("name", { + extra: "This is internal and will not be visible to subscribers", + initialValue: record.name, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("subject", { + initialValue: record.subject, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("from_email", { + initialValue: record.from_email, + rules: [{ required: true }, { validator: this.validateEmail }] + })()} + + + {getFieldDecorator("lists", { initialValue: subLists, rules: [{ required: true }] })( + + )} + + + {getFieldDecorator("template_id", { initialValue: record.template_id, rules: [{ required: true }] })( + + )} + + + {getFieldDecorator("tags", { initialValue: record.tags })( + + )} + + + {getFieldDecorator("messenger", { initialValue: record.messenger ? record.messenger : "email" })( + + {[...this.props.messengers].map((v, i) => + { v } + )} + + )} + + +
+ + + + {getFieldDecorator("send_later", { defaultChecked: this.props.isSingle })( + + )} + + + {this.state.sendLater && getFieldDecorator("send_at", + { initialValue: (record && typeof(record.send_at) === "string") ? moment(record.send_at) : moment(new Date()).add(1, "days").startOf("day") })( + + )} + + + + + { !this.props.formDisabled && + + + + } +
+ + { this.props.isSingle && +
+
+ + +
+
+
+ } +
+ + ) + } +} +const TheForm = Form.create()(TheFormDef) + + +class Campaign extends React.PureComponent { + state = { + campaignID: this.props.route.match.params ? parseInt(this.props.route.match.params.campaignID, 10) : 0, + record: {}, + contentType: "richtext", + messengers: [], + body: "", + currentTab: "form", + editor: null, + loading: true, + mediaVisible: false, + formDisabled: false + } + + componentDidMount = () => { + // Fetch lists. + this.props.modelRequest(cs.ModelLists, cs.Routes.GetLists, cs.MethodGet) + + // Fetch templates. + this.props.modelRequest(cs.ModelTemplates, cs.Routes.GetTemplates, cs.MethodGet) + + // Fetch messengers. + this.props.request(cs.Routes.GetCampaignMessengers, cs.MethodGet).then((r) => { + this.setState({ messengers: r.data.data, loading: false }) + }) + + // Fetch campaign. + if(this.state.campaignID) { + this.fetchRecord(this.state.campaignID) + } + } + + fetchRecord = (id) => { + this.props.request(cs.Routes.GetCampaigns, cs.MethodGet, { id: id }).then((r) => { + const record = r.data.data + this.setState({ record: record, loading: false }) + + // The form for non draft and scheduled campaigns should be locked. + if(record.status !== cs.CampaignStatusDraft && + record.status !== cs.CampaignStatusScheduled) { + this.setState({ formDisabled: true }) + } + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + setContent = (contentType, body) => { + this.setState({ contentType: contentType, body: body }) + } + + toggleMedia = () => { + this.setState({ mediaVisible: !this.state.mediaVisible }) + } + + setCurrentTab = (tab) => { + this.setState({ currentTab: tab }) + } + + render() { + return ( +
+ + + { !this.state.record.id &&

Create a campaign

} + { this.state.record.id && +

+ { this.state.record.status } + { this.state.record.name } +

+ } + + + +
+
+ + { + this.setState({ currentTab: t }) + }}> + + + + + + + { + // Take the editor's reference and save it in the state + // so that it's insertMedia() function can be passed to + this.setState({ editor: e }) + }} + isSingle={ this.state.record.id ? true : false } + record={ this.state.record } + visible={ this.state.editorVisible } + toggleMedia={ this.toggleMedia } + setContent={ this.setContent } + formDisabled={ this.state.formDisabled } + /> +
+

+
+
+
+ + + + +
+ ) + } +} + +export default Campaign diff --git a/frontend/my/src/Campaigns.js b/frontend/my/src/Campaigns.js new file mode 100644 index 0000000..5040b40 --- /dev/null +++ b/frontend/my/src/Campaigns.js @@ -0,0 +1,397 @@ +import React from "react" +import { Link } from "react-router-dom" +import { Row, Col, Button, Table, Icon, Tooltip, Tag, Popconfirm, Progress, Modal, Select, notification, Input } from "antd" +import dayjs from "dayjs" +import relativeTime from 'dayjs/plugin/relativeTime' + +import * as cs from "./constants" + +class Campaigns extends React.PureComponent { + defaultPerPage = 20 + + state = { + formType: null, + pollID: -1, + queryParams: "", + stats: {}, + record: null, + cloneName: "", + modalWaiting: false + } + + // Pagination config. + paginationOptions = { + hideOnSinglePage: true, + showSizeChanger: true, + showQuickJumper: true, + defaultPageSize: this.defaultPerPage, + pageSizeOptions: ["20", "50", "70", "100"], + position: "both", + showTotal: (total, range) => `${range[0]} to ${range[1]} of ${total}`, + onChange: (page, perPage) => { + this.fetchRecords({ page: page, per_page: perPage }) + }, + onShowSizeChange: (page, perPage) => { + this.fetchRecords({ page: page, per_page: perPage }) + } + } + + constructor(props) { + super(props) + + this.columns = [{ + title: "Name", + dataIndex: "name", + sorter: true, + width: "30%", + vAlign: "top", + render: (text, record) => { + const out = []; + out.push( +
+ { text }
+ { record.subject } +
+ ) + + if(record.tags.length > 0) { + for (let i = 0; i < record.tags.length; i++) { + out.push({ record.tags[i] }); + } + } + + return out + } + }, + { + title: "Status", + dataIndex: "status", + className: "status", + width: "10%", + render: (status, record) => { + let color = cs.CampaignStatusColors.hasOwnProperty(status) ? cs.CampaignStatusColors[status] : "" + return ( +
+ {status} + {record.send_at && + Scheduled — { dayjs(record.send_at).format(cs.DateFormat) } + } +
+ ) + } + }, + { + title: "Lists", + dataIndex: "lists", + width: "20%", + align: "left", + className: "lists", + render: (lists, record) => { + const out = [] + lists.forEach((l) => { + out.push( + { l.name } + ) + }) + + return out + } + }, + { + title: "Stats", + className: "stats", + render: (text, record) => { + if(record.status !== cs.CampaignStatusDraft && record.status !== cs.CampaignStatusScheduled) { + return this.renderStats(record) + } + } + }, + { + title: "", + dataIndex: "actions", + className: "actions", + width: "10%", + render: (text, record) => { + return ( +
+ + { + let r = { ...record, lists: record.lists.map((i) => { return i.id }) } + this.handleToggleCloneForm(r) + }}> + + + { ( record.status === cs.CampaignStatusPaused ) && + this.handleUpdateStatus(record, cs.CampaignStatusRunning)}> + + + } + + { ( record.status === cs.CampaignStatusRunning ) && + this.handleUpdateStatus(record, cs.CampaignStatusPaused)}> + + + } + + {/* Draft with send_at */} + { ( record.status === cs.CampaignStatusDraft && record.send_at) && + this.handleUpdateStatus(record, cs.CampaignStatusScheduled) }> + + + } + + { ( record.status === cs.CampaignStatusDraft && !record.send_at) && + this.handleUpdateStatus(record, cs.CampaignStatusRunning) }> + + + } + + { ( record.status === cs.CampaignStatusPaused || record.status === cs.CampaignStatusRunning) && + this.handleUpdateStatus(record, cs.CampaignStatusCancelled)}> + + + } + + { ( record.status === cs.CampaignStatusDraft || record.status === cs.CampaignStatusScheduled ) && + this.handleDeleteRecord(record)}> + + + } +
+ ) + } + }] + } + + progressPercent(record) { + return Math.round(this.getStatsField("sent", record) / this.getStatsField("to_send", record) * 100, 2) + } + + isDone(record) { + return this.getStatsField("status", record) === cs.CampaignStatusFinished || + this.getStatsField("status", record) === cs.CampaignStatusCancelled + } + + // getStatsField returns a stats field value of a given record if it + // exists in the stats state, or the value from the record itself. + getStatsField = (field, record) => { + if(this.state.stats.hasOwnProperty(record.id)) { + return this.state.stats[record.id][field] + } + + return record[field] + } + + renderStats = (record) => { + let color = cs.CampaignStatusColors.hasOwnProperty(record.status) ? cs.CampaignStatusColors[record.status] : "" + const startedAt = this.getStatsField("started_at", record) + const updatedAt = this.getStatsField("updated_at", record) + const sent = this.getStatsField("sent", record) + const toSend = this.getStatsField("to_send", record) + const isDone = this.isDone(record) + + const r = this.getStatsField("rate", record) + const rate = r ? r : 0 + + return ( +
+ { !isDone && + + } + + Sent + { sent >= toSend && + { toSend } + } + { sent < toSend && + { sent } / { toSend } + } +   + { record.status === cs.CampaignStatusRunning && + + } + + + { rate > 0 && + Rate{ Math.round(rate, 2) } / min + } + + Views0 + Clicks0 +
+ + Created{ dayjs(record.created_at).format(cs.DateFormat) } + + { startedAt && + Started{ dayjs(startedAt).format(cs.DateFormat) } + } + + { isDone && + Ended + { dayjs(updatedAt).format(cs.DateFormat) } + + } + Duration + { startedAt ? dayjs(updatedAt).from(dayjs(startedAt), true) : "" } + +
+ ) + } + + componentDidMount() { + dayjs.extend(relativeTime) + this.fetchRecords() + } + + componentWillUnmount() { + window.clearInterval(this.state.pollID) + } + + fetchRecords = (params) => { + let qParams = { + page: this.state.queryParams.page, + per_page: this.state.queryParams.per_page + } + + // The records are for a specific list. + if(this.state.queryParams.listID) { + qParams.listID = this.state.queryParams.listID + } + + if(params) { + qParams = { ...qParams, ...params } + } + + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.GetCampaigns, cs.MethodGet, qParams).then((r) => { + this.startStatsPoll() + }) + } + + startStatsPoll = () => { + window.clearInterval(this.state.pollID) + this.setState({ "stats": {} }) + + // If there's at least one running campaign, start polling. + let hasRunning = false + this.props.data[cs.ModelCampaigns].forEach((c) => { + if(c.status === cs.CampaignStatusRunning) { + hasRunning = true + return + } + }) + + if(!hasRunning) { + return + } + + // Poll for campaign stats. + let pollID = window.setInterval(() => { + this.props.request(cs.Routes.GetRunningCampaignStats, cs.MethodGet).then((r) => { + // No more running campaigns. + if(r.data.data.length === 0) { + window.clearInterval(this.state.pollID) + this.fetchRecords() + return + } + + let stats = {} + r.data.data.forEach((s) => { + stats[s.id] = s + }) + + this.setState({ stats: stats }) + }).catch(e => { + console.log(e.message) + }) + }, 3000) + + this.setState({ pollID: pollID }) + } + + handleUpdateStatus = (record, status) => { + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.UpdateCampaignStatus, cs.MethodPut, { id: record.id, status: status }) + .then(() => { + notification["success"]({ placement: "topRight", message: `Campaign ${status}`, description: `"${record.name}" ${status}` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleDeleteRecord = (record) => { + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.DeleteCampaign, cs.MethodDelete, { id: record.id }) + .then(() => { + notification["success"]({ placement: "topRight", message: "Campaign deleted", description: `"${record.name}" deleted` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleToggleCloneForm = (record) => { + this.setState({ record: record, cloneName: record.name }) + } + + handleCloneCampaign = (record) => { + this.setState({ modalWaiting: true }) + this.props.modelRequest(cs.ModelCampaigns, cs.Routes.CreateCampaign, cs.MethodPost, record).then((resp) => { + notification["success"]({ placement: "topRight", + message: "Campaign created", + description: `${record.name} created` }) + + this.setState({ record: null, modalWaiting: false }) + this.props.route.history.push(cs.Routes.ViewCampaign.replace(":id", resp.data.data.id)) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } + + render() { + const pagination = { + ...this.paginationOptions, + ...this.state.queryParams + } + + return ( +
+ +

Campaigns

+ + + +
+
+ + record.uuid } + dataSource={ this.props.data[cs.ModelCampaigns] } + loading={ this.props.reqStates[cs.ModelCampaigns] !== cs.StateDone } + pagination={ pagination } + /> + + { this.state.record && + { this.handleCloneCampaign({ ...this.state.record, name: this.state.cloneName }) }}> + { + this.setState({ cloneName: e.target.value }) + }} /> + } + + ) + } +} + +export default Campaigns diff --git a/frontend/my/src/Dashboard.css b/frontend/my/src/Dashboard.css new file mode 100644 index 0000000..90238ef --- /dev/null +++ b/frontend/my/src/Dashboard.css @@ -0,0 +1,26 @@ +.App { + text-align: center; +} + +.App-logo { + animation: App-logo-spin infinite 20s linear; + height: 80px; +} + +.App-header { + height: 150px; + padding: 20px; +} + +.App-title { + font-size: 1.5em; +} + +.App-intro { + font-size: large; +} + +@keyframes App-logo-spin { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } +} diff --git a/frontend/my/src/Dashboard.js b/frontend/my/src/Dashboard.js new file mode 100644 index 0000000..3d998a3 --- /dev/null +++ b/frontend/my/src/Dashboard.js @@ -0,0 +1,12 @@ +import React from 'react'; +import 'antd/dist/antd.css'; + +class Dashboard extends React.Component { + render() { + return ( +

Welcome

+ ); + } +} + +export default Dashboard; diff --git a/frontend/my/src/Dashboard.test.js b/frontend/my/src/Dashboard.test.js new file mode 100644 index 0000000..a754b20 --- /dev/null +++ b/frontend/my/src/Dashboard.test.js @@ -0,0 +1,9 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import App from './App'; + +it('renders without crashing', () => { + const div = document.createElement('div'); + ReactDOM.render(, div); + ReactDOM.unmountComponentAtNode(div); +}); diff --git a/frontend/my/src/Import.js b/frontend/my/src/Import.js new file mode 100644 index 0000000..25f4336 --- /dev/null +++ b/frontend/my/src/Import.js @@ -0,0 +1,345 @@ +import React from "react" +import { Row, Col, Form, Select, Input, Checkbox, Upload, Button, Icon, Spin, Progress, Popconfirm, Tag, notification } from "antd" +import * as cs from "./constants" + +const StatusNone = "none" +const StatusImporting = "importing" +const StatusStopping = "stopping" +const StatusFinished = "finished" +const StatusFailed = "failed" + +class TheFormDef extends React.PureComponent { + state = { + confirmDirty: false, + fileList: [] + } + + componentDidMount() { + // Fetch lists. + this.props.modelRequest(cs.ModelLists, cs.Routes.GetLists, cs.MethodGet) + } + + // Handle create / edit form submission. + handleSubmit = (e) => { + e.preventDefault() + var err = null, values = {} + this.props.form.validateFields((e, v) => { + err = e + values = v + }) + if (err) { + return + } + + if(this.state.fileList.length < 1) { + notification["error"]({ message: "Error", description: "Select a valid file to upload" }) + return + } + + let params = new FormData() + params.set("params", JSON.stringify(values)) + params.append("file", this.state.fileList[0]) + + this.props.request(cs.Routes.UploadRouteImport, cs.MethodPost, params).then(() => { + notification["info"]({ message: "File uploaded", + description: "Please wait while the import is running" }) + this.props.fetchimportState() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleConfirmBlur = (e) => { + const value = e.target.value + this.setState({ confirmDirty: this.state.confirmDirty || !!value }) + } + + onFileChange = (f) => { + let fileList = [f] + this.setState({ fileList }) + return false + } + + render() { + const { getFieldDecorator } = this.props.form + + const formItemLayout = { + labelCol: { xs: { span: 16 }, sm: { span: 4 } }, + wrapperCol: { xs: { span: 16 }, sm: { span: 10 } } + } + + const formItemTailLayout = { + wrapperCol: { xs: { span: 24, offset: 0 }, sm: { span: 10, offset: 4 } } + } + + return ( + +
+ + {getFieldDecorator("lists", { rules: [{ required: true }] })( + + )} + + + {getFieldDecorator("override_status", )( + + )} + + + {getFieldDecorator("delim", { + initialValue: "," + })()} + + +
+ {getFieldDecorator("file", { + valuePropName: "file", + getValueFromEvent: this.normFile, + rules: [{ required: true }] + })( + +

+ +

+

Click or drag file here

+
+ )} +
+
+ + + + +
+ ) + } +} +const TheForm = Form.create()(TheFormDef) + +class Importing extends React.PureComponent { + state = { + pollID: -1, + logs: "" + } + + stopImport = () => { + // Get the import status. + this.props.request(cs.Routes.UploadRouteImport, cs.MethodDelete).then((r) => { + this.props.fetchimportState() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + componentDidMount() { + // Poll for stats until it's finished or failed. + let pollID = window.setInterval(() => { + this.props.fetchimportState() + this.fetchLogs() + if( this.props.importState.status === StatusFinished || + this.props.importState.status === StatusFailed ) { + window.clearInterval(this.state.pollID) + } + }, 1000) + + this.setState({ pollID: pollID }) + } + componentWillUnmount() { + window.clearInterval(this.state.pollID) + } + + fetchLogs() { + this.props.request(cs.Routes.GetRouteImportLogs, cs.MethodGet).then((r) => { + this.setState({ logs: r.data.data }) + let t = document.querySelector("#log-textarea") + t.scrollTop = t.scrollHeight; + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + render() { + let progressPercent = 0 + if( this.props.importState.status === StatusFinished ) { + progressPercent = 100 + } else { + progressPercent = Math.floor(this.props.importState.imported / this.props.importState.total * 100) + } + + return( +
+

Importing — { this.props.importState.name }

+ { this.props.importState.status === StatusImporting && +

Import is in progress. It is safe to navigate away from this page.

+ } + + { this.props.importState.status !== StatusImporting && +

Import has finished.

+ } + + +
+
+
+ +
+ +
+

{ this.props.importState.imported } records

+
+ + { this.props.importState.status === StatusImporting && + this.stopImport()}> +

+ +
+ } + { this.props.importState.status === StatusStopping && +
+

+

Stopping

+
+ } + { this.props.importState.status !== StatusImporting && + this.props.importState.status !== StatusStopping && +
+ { this.props.importState.status !== StatusFinished && +
+ { this.props.importState.status } +
+
+ } + +
+ +
+ } +
+
+ +
+

Import log

+ + + +
+ + + + ) + } +} + +class Import extends React.PureComponent { + state = { + importState: { "status": "" } + } + + fetchimportState = () => { + // Get the import status. + this.props.request(cs.Routes.GetRouteImportStats, cs.MethodGet).then((r) => { + this.setState({ importState: r.data.data }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + componentDidMount() { + this.fetchimportState() + } + render() { + if( this.state.importState.status === "" ) { + // Fetching the status. + return ( +
+ +
+ ) + } else if ( this.state.importState.status !== StatusNone ) { + // There's an import state + return + } + + return ( +
+ +

Import subscribers

+ + + + + + + +
+
+

Instructions

+

Upload a ZIP file with a single CSV file in it + to bulk import a large number of subscribers in a single shot. +

+

+ The CSV file should have the following headers with the exact column names + (status and attributes are optional). + {" "} + attributes should be a valid JSON string with double escaped quotes. + Spreadsheet programs should automatically take care of this without having to manually + escape quotes. +

+ +
+ + email, + name, + status, + attributes + +
+ +

Example raw CSV

+
+ + email, + name, + status, + attributes + + + user1@mail.com, + "User One", + enabled, + { '"{""age"": 32, ""city"": ""Bangalore""}"' } + + + user2@mail.com, + "User Two", + blacklisted, + { '"{""age"": 25, ""occupation"": ""Time Traveller""}"' } + +
+
+ + ) + } +} + +export default Import diff --git a/frontend/my/src/Layout.js b/frontend/my/src/Layout.js new file mode 100644 index 0000000..17e2a72 --- /dev/null +++ b/frontend/my/src/Layout.js @@ -0,0 +1,112 @@ +import React from "react" +import { Switch, Route } from "react-router-dom" +import { Link } from "react-router-dom" +import { Layout, Menu, Icon } from "antd" + +import "antd/dist/antd.css" +import logo from "./static/listmonk.svg" + +// Views. +import Dashboard from "./Dashboard" +import Lists from "./Lists" +import Subscribers from "./Subscribers" +import Templates from "./Templates" +import Import from "./Import" +import Test from "./Test" +import Campaigns from "./Campaigns"; +import Campaign from "./Campaign"; +import Media from "./Media"; + +const { Content, Footer, Sider } = Layout +const SubMenu = Menu.SubMenu + +class Base extends React.Component { + state = { + basePath: "/" + window.location.pathname.split("/")[1], + error: null, + collapsed: false + }; + + onCollapse = (collapsed) => { + this.setState({ collapsed }) + } + + render() { + return ( + + +
+ listmonk logo +
+ + + + Dashboard + Lists + Subscribers}> + All subscribers + Import + + + Campaigns}> + All campaigns + Create new + Media + Templates + + + Settings}> + Users + Settings + + Logout + +
+ + + +
+ +
+ {/* */} + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + +
+
+
+ listmonk © 2018. MIT License. +
+
+
+ ) + } +} + +export default Base diff --git a/frontend/my/src/Lists.js b/frontend/my/src/Lists.js new file mode 100644 index 0000000..1a487a2 --- /dev/null +++ b/frontend/my/src/Lists.js @@ -0,0 +1,240 @@ +import React from "react" +import { Link } from "react-router-dom" +import { Row, Col, Modal, Form, Input, Select, Button, Table, Icon, Tooltip, Tag, Popconfirm, Spin, notification } from "antd" + +import Utils from "./utils" +import * as cs from "./constants" + +class CreateFormDef extends React.PureComponent { + state = { + confirmDirty: false, + modalWaiting: false + } + + // Handle create / edit form submission. + handleSubmit = (e) => { + e.preventDefault() + this.props.form.validateFields((err, values) => { + if (err) { + return + } + + this.setState({ modalWaiting: true }) + if (this.props.formType === cs.FormCreate) { + // Create a new list. + this.props.modelRequest(cs.ModelLists, cs.Routes.CreateList, cs.MethodPost, values).then(() => { + notification["success"]({ placement: "topRight", message: "List created", description: `"${values["name"]}" created` }) + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } else { + // Edit a list. + this.props.modelRequest(cs.ModelLists, cs.Routes.UpdateList, cs.MethodPut, { ...values, id: this.props.record.id }).then(() => { + notification["success"]({ placement: "topRight", message: "List modified", description: `"${values["name"]}" modified` }) + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } + }) + } + + render() { + const { formType, record, onClose } = this.props + const { getFieldDecorator } = this.props.form + + const formItemLayout = { + labelCol: { xs: { span: 16 }, sm: { span: 4 } }, + wrapperCol: { xs: { span: 16 }, sm: { span: 18 } } + } + + if (formType === null) { + return null + } + + return ( + + + + + +
+ + {getFieldDecorator("name", { + initialValue: record.name, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("type", { initialValue: record.type ? record.type : "private", rules: [{ required: true }] })( + + )} + + + {getFieldDecorator("tags", { initialValue: record.tags })( + + )} + + +
+
+ ) + } +} + +const CreateForm = Form.create()(CreateFormDef) + +class Lists extends React.PureComponent { + state = { + formType: null, + record: {} + } + + constructor(props) { + super(props) + + this.columns = [{ + title: "Name", + dataIndex: "name", + sorter: true, + width: "50%", + render: (text, record) => { + const out = []; + out.push( +
{ text }
+ ) + + if(record.tags.length > 0) { + for (let i = 0; i < record.tags.length; i++) { + out.push({ record.tags[i] }); + } + } + + return out + } + }, + { + title: "Type", + dataIndex: "type", + width: "5%", + render: (type, _) => { + let color = type === "private" ? "orange" : "green" + return {type} + } + }, + { + title: "Subscribers", + dataIndex: "subscriber_count", + width: "10%", + align: "center" + }, + { + title: "Created", + dataIndex: "created_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "Updated", + dataIndex: "updated_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "", + dataIndex: "actions", + width: "10%", + render: (text, record) => { + return ( +
+ + this.handleShowEditForm(record)}> + this.deleteRecord(record)}> + + +
+ ) + } + }] + } + + componentDidMount() { + this.fetchRecords() + } + + fetchRecords = () => { + this.props.modelRequest(cs.ModelLists, cs.Routes.GetLists, cs.MethodGet) + } + + deleteRecord = (record) => { + this.props.modelRequest(cs.ModelLists, cs.Routes.DeleteList, cs.MethodDelete, { id: record.id }) + .then(() => { + notification["success"]({ placement: "topRight", message: "List deleted", description: `"${record.name}" deleted` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleHideForm = () => { + this.setState({ formType: null }) + } + + handleShowCreateForm = () => { + this.setState({ formType: cs.FormCreate, record: {} }) + } + + handleShowEditForm = (record) => { + this.setState({ formType: cs.FormEdit, record: record }) + } + + render() { + return ( +
+ +

Lists ({this.props.data[cs.ModelLists].length})

+ + + + +
+ +
record.uuid } + dataSource={ this.props.data[cs.ModelLists] } + loading={ this.props.reqStates[cs.ModelLists] !== cs.StateDone } + pagination={ false } + /> + + + + ) + } +} + +export default Lists diff --git a/frontend/my/src/Media.js b/frontend/my/src/Media.js new file mode 100644 index 0000000..8ecf580 --- /dev/null +++ b/frontend/my/src/Media.js @@ -0,0 +1,129 @@ +import React from "react" +import { Row, Col, Form, Upload, Icon, Spin, Popconfirm, Tooltip, notification } from "antd" +import * as cs from "./constants" + +class TheFormDef extends React.PureComponent { + state = { + confirmDirty: false + } + + componentDidMount() { + this.fetchRecords() + } + + fetchRecords = () => { + this.props.modelRequest(cs.ModelMedia, cs.Routes.GetMedia, cs.MethodGet) + } + + handleDeleteRecord = (record) => { + this.props.modelRequest(cs.ModelMedia, cs.Routes.DeleteMedia, cs.MethodDelete, { id: record.id }) + .then(() => { + notification["success"]({ placement: "topRight", message: "Image deleted", description: `"${record.filename}" deleted` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleInsertMedia = (record) => { + // The insertMedia callback may be passed down by the invoker (Campaign) + if(!this.props.insertMedia) { + return false + } + + this.props.insertMedia(record.uri) + return false + } + + onFileChange = (f) => { + if(f.file.error && f.file.response && f.file.response.hasOwnProperty("message")) { + notification["error"]({ message: "Error uploading file", description: f.file.response.message }) + } else if(f.file.status === "done") { + this.fetchRecords() + } + + return false + } + + render() { + const { getFieldDecorator } = this.props.form + const formItemLayout = { + labelCol: { xs: { span: 16 }, sm: { span: 4 } }, + wrapperCol: { xs: { span: 16 }, sm: { span: 10 } } + } + + return ( + +
+ +
+ {getFieldDecorator("file", { + valuePropName: "file", + getValueFromEvent: this.normFile, + rules: [{ required: true }] + })( + +

+ +

+

Click or drag file here

+
+ )} +
+
+ + +
+ {this.props.media && this.props.media.map((record, i) => +
+ { + this.handleInsertMedia(record); + if( this.props.onCancel ) { + this.props.onCancel(); + } + } }>{ +
+ + this.handleDeleteRecord(record)}> + + +
+
{ record.filename }
+
+ )} +
+
+ ) + } +} +const TheForm = Form.create()(TheFormDef) + +class Media extends React.PureComponent { + render() { + return ( +
+ +

Images

+ + + + + + + + ) + } +} + +export default Media diff --git a/frontend/my/src/Subscribers.js b/frontend/my/src/Subscribers.js new file mode 100644 index 0000000..0379264 --- /dev/null +++ b/frontend/my/src/Subscribers.js @@ -0,0 +1,517 @@ +import React from "react" +import { Row, Col, Modal, Form, Input, Select, Button, Table, Icon, Tooltip, Tag, Popconfirm, Spin, notification } from "antd" + +import Utils from "./utils" +import * as cs from "./constants" + + +const tagColors = { + "enabled": "green", + "blacklisted": "red" +} + +class CreateFormDef extends React.PureComponent { + state = { + confirmDirty: false, + attribs: {}, + modalWaiting: false + } + + componentDidMount() { + this.setState({ attribs: this.props.record.attribs }) + } + + // Handle create / edit form submission. + handleSubmit = (e) => { + e.preventDefault() + + var err = null, values = {} + this.props.form.validateFields((e, v) => { + err = e + values = v + }) + if(err) { + return + } + + values["attribs"] = {} + + let a = this.props.form.getFieldValue("attribs-json") + if(a && a.length > 0) { + try { + values["attribs"] = JSON.parse(a) + if(values["attribs"] instanceof Array) { + notification["error"]({ message: "Invalid JSON type", + description: "Attributes should be a map {} and not an array []" }) + return + } + } catch(e) { + notification["error"]({ message: "Invalid JSON in attributes", description: e.toString() }) + return + } + } + + this.setState({ modalWaiting: true }) + if (this.props.formType === cs.FormCreate) { + // Add a subscriber. + this.props.modelRequest(cs.ModelSubscribers, cs.Routes.CreateSubscriber, cs.MethodPost, values).then(() => { + notification["success"]({ message: "Subscriber added", description: `${values["email"]} added` }) + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } else { + // Edit a subscriber. + delete(values["keys"]) + delete(values["vals"]) + this.props.modelRequest(cs.ModelSubscribers, cs.Routes.UpdateSubscriber, cs.MethodPut, { ...values, id: this.props.record.id }).then(() => { + notification["success"]({ message: "Subscriber modified", description: `${values["email"]} modified` }) + + // Reload the table. + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } + } + + modalTitle(formType, record) { + if(formType === cs.FormCreate) { + return "Add subscriber" + } + + return ( + + { record.status } + {" "} + { record.name } ({ record.email }) + + ) + } + + render() { + const { formType, record, onClose } = this.props; + const { getFieldDecorator } = this.props.form + const formItemLayout = { + labelCol: { xs: { span: 16 }, sm: { span: 4 } }, + wrapperCol: { xs: { span: 16 }, sm: { span: 18 } } + } + + if (formType === null) { + return null + } + + let subListIDs = [] + let subStatuses = {} + if(this.props.record && this.props.record.lists) { + subListIDs = this.props.record.lists.map((v) => { return v["id"] }) + subStatuses = this.props.record.lists.reduce((o, item) => ({ ...o, [item.id]: item.subscription_status}), {}) + } else if(this.props.list) { + subListIDs = [ this.props.list.id ] + } + + return ( + + + + +
+ + {getFieldDecorator("email", { + initialValue: record.email, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("name", { + initialValue: record.name, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("status", { initialValue: record.status ? record.status : "enabled", rules: [{ required: true, message: "Type is required" }] })( + + )} + + + {getFieldDecorator("lists", { initialValue: subListIDs })( + + )} + +
+

Attributes

+

Attributes can be defined as a JSON map, for example: + {'{"age": 30, "color": "red", "is_user": true}'}. More info.

+ +
+ {getFieldDecorator("attribs-json", { + initialValue: JSON.stringify(this.state.attribs, null, 4) + })( + )} +
+
+ +
+
+ ) + } +} + +const CreateForm = Form.create()(CreateFormDef) + +class Subscribers extends React.PureComponent { + defaultPerPage = 20 + + state = { + formType: null, + record: {}, + queryParams: { + page: 1, + total: 0, + perPage: this.defaultPerPage, + listID: this.props.route.match.params.listID ? parseInt(this.props.route.match.params.listID, 10) : 0, + list: null, + query: null, + targetLists: [] + }, + listAddVisible: false + } + + // Pagination config. + paginationOptions = { + hideOnSinglePage: true, + showSizeChanger: true, + showQuickJumper: true, + defaultPageSize: this.defaultPerPage, + pageSizeOptions: ["20", "50", "70", "100"], + position: "both", + showTotal: (total, range) => `${range[0]} to ${range[1]} of ${total}`, + onChange: (page, perPage) => { + this.fetchRecords({ page: page, per_page: perPage }) + }, + onShowSizeChange: (page, perPage) => { + this.fetchRecords({ page: page, per_page: perPage }) + } + } + + constructor(props) { + super(props) + + // Table layout. + this.columns = [{ + title: "E-mail", + dataIndex: "email", + sorter: true, + width: "25%", + render: (text, record) => { + return ( + this.handleShowEditForm(record)}>{text} + ) + } + }, + { + title: "Name", + dataIndex: "name", + sorter: true, + width: "25%", + render: (text, record) => { + return ( + this.handleShowEditForm(record)}>{text} + ) + } + }, + { + title: "Status", + dataIndex: "status", + width: "5%", + render: (status, _) => { + return { status } + } + }, + { + title: "Lists", + dataIndex: "lists", + width: "10%", + align: "center", + render: (lists, _) => { + return { lists.reduce((def, item) => def + (item.subscription_status !== cs.SubscriptionStatusUnsubscribed ? 1 : 0), 0) } + } + }, + { + title: "Created", + width: "10%", + dataIndex: "created_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "Updated", + width: "10%", + dataIndex: "updated_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "", + dataIndex: "actions", + width: "10%", + render: (text, record) => { + return ( +
+ {/* */} + this.handleShowEditForm(record)}> + this.handleDeleteRecord(record)}> + + +
+ ) + } + } + ] + } + + componentDidMount() { + // Load lists on boot. + this.props.modelRequest(cs.ModelLists, cs.Routes.GetLists, cs.MethodGet).then(() => { + // If this is an individual list's view, pick up that list. + if(this.state.queryParams.listID) { + this.props.data[cs.ModelLists].forEach((l) => { + if(l.id === this.state.queryParams.listID) { + this.setState({ queryParams: { ...this.state.queryParams, list: l }}) + return false + } + }) + } + }) + + this.fetchRecords() + } + + fetchRecords = (params) => { + let qParams = { + page: this.state.queryParams.page, + per_page: this.state.queryParams.per_page, + list_id: this.state.queryParams.listID, + query: this.state.queryParams.query + } + + // The records are for a specific list. + if(this.state.queryParams.listID) { + qParams.list_id = this.state.queryParams.listID + } + + if(params) { + qParams = { ...qParams, ...params } + } + + this.props.modelRequest(cs.ModelSubscribers, cs.Routes.GetSubscribers, cs.MethodGet, qParams).then(() => { + this.setState({ queryParams: { + ...this.state.queryParams, + total: this.props.data[cs.ModelSubscribers].total, + perPage: this.props.data[cs.ModelSubscribers].per_page, + page: this.props.data[cs.ModelSubscribers].page, + query: this.props.data[cs.ModelSubscribers].query, + }}) + }) + } + + handleDeleteRecord = (record) => { + this.props.modelRequest(cs.ModelSubscribers, cs.Routes.DeleteSubscriber, cs.MethodDelete, { id: record.id }) + .then(() => { + notification["success"]({ message: "Subscriber deleted", description: `${record.email} deleted` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleQuerySubscribersIntoLists = (query, sourceList, targetLists) => { + let params = { + query: query, + source_list: sourceList, + target_lists: targetLists + } + + this.props.request(cs.Routes.QuerySubscribersIntoLists, cs.MethodPost, params).then((res) => { + notification["success"]({ message: "Subscriber(s) added", description: `${ res.data.data.count } added` }) + this.handleToggleListAdd() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleHideForm = () => { + this.setState({ formType: null }) + } + + handleShowCreateForm = () => { + this.setState({ formType: cs.FormCreate, attribs: [], record: {} }) + } + + handleShowEditForm = (record) => { + this.setState({ formType: cs.FormEdit, record: record }) + } + + handleToggleQueryForm = () => { + // The query form is being cancelled. Reset the results. + if(this.state.queryFormVisible) { + this.fetchRecords({ + query: null + }) + } + + this.setState({ queryFormVisible: !this.state.queryFormVisible }) + } + + handleToggleListAdd = () => { + this.setState({ listAddVisible: !this.state.listAddVisible }) + } + + render() { + const pagination = { + ...this.paginationOptions, + ...this.state.queryParams + } + + return ( +
+
+ +
+

+ Subscribers + { this.state.queryParams.list && + » { this.state.queryParams.list.name } } + +

+ + + { !this.state.queryFormVisible && + Advanced } + + + + + + + + { this.state.queryFormVisible && +
+

+ Write a partial SQL expression to query the subscribers based on their + primary information or attributes. Learn more. +

+ { + this.setState({ queryParams: { ...this.state.queryParams, query: e.target.value } }) + }} + autosize={{ minRows: 2, maxRows: 10 }} /> + +
+ + {" "} + + {" "} + +
+
+ } + +
`${record.id}-${record.email}` } + dataSource={ this.props.data[cs.ModelSubscribers].results } + loading={ this.props.reqStates[cs.ModelSubscribers] !== cs.StateDone } + pagination={ pagination } + rowSelection = {{ + fixed: true + }} + /> + + { this.state.formType !== null && + } + + { + if(this.state.queryParams.targetLists.length == 0) { + notification["warning"]({ + message: "No lists selected", + description: "Select one or more lists" + }) + return false + } + + this.handleQuerySubscribersIntoLists( + this.state.queryParams.query, + this.state.queryParams.listID, + this.state.queryParams.targetLists + ) + }} + okButtonProps={{ disabled: this.props.reqStates[cs.ModelSubscribers] === cs.StatePending }}> + + + + ) + } +} + +export default Subscribers diff --git a/frontend/my/src/Templates.js b/frontend/my/src/Templates.js new file mode 100644 index 0000000..b236c05 --- /dev/null +++ b/frontend/my/src/Templates.js @@ -0,0 +1,262 @@ +import React from "react" +import { Row, Col, Modal, Form, Input, Button, Table, Icon, Tooltip, Tag, Popconfirm, Spin, notification } from "antd" + +import Utils from "./utils" +import * as cs from "./constants" + +class CreateFormDef extends React.PureComponent { + state = { + confirmDirty: false, + modalWaiting: false + } + + // Handle create / edit form submission. + handleSubmit = (e) => { + e.preventDefault() + this.props.form.validateFields((err, values) => { + if (err) { + return + } + + this.setState({ modalWaiting: true }) + if (this.props.formType === cs.FormCreate) { + // Create a new list. + this.props.modelRequest(cs.ModelTemplates, cs.Routes.CreateTemplate, cs.MethodPost, values).then(() => { + notification["success"]({ placement: "topRight", message: "Template added", description: `"${values["name"]}" added` }) + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } else { + // Edit a list. + this.props.modelRequest(cs.ModelTemplates, cs.Routes.UpdateTemplate, cs.MethodPut, { ...values, id: this.props.record.id }).then(() => { + notification["success"]({ placement: "topRight", message: "Template updated", description: `"${values["name"]}" modified` }) + this.props.fetchRecords() + this.props.onClose() + this.setState({ modalWaiting: false }) + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + this.setState({ modalWaiting: false }) + }) + } + }) + } + + handleConfirmBlur = (e) => { + const value = e.target.value + this.setState({ confirmDirty: this.state.confirmDirty || !!value }) + } + + render() { + const { formType, record, onClose } = this.props + const { getFieldDecorator } = this.props.form + + const formItemLayout = { + labelCol: { xs: { span: 16 }, sm: { span: 4 } }, + wrapperCol: { xs: { span: 16 }, sm: { span: 18 } } + } + + if (formType === null) { + return null + } + + return ( + + + +
+ + {getFieldDecorator("name", { + initialValue: record.name, + rules: [{ required: true }] + })()} + + + {getFieldDecorator("body", { initialValue: record.body ? record.body : "", rules: [{ required: true }] })( + + + )} + + +
+ +
+ + The placeholder {'{'}{'{'} template "content" . {'}'}{'}'} should appear in the template. Read more on templating. + + + + ) + } +} + +const CreateForm = Form.create()(CreateFormDef) + +class Templates extends React.PureComponent { + state = { + formType: null, + record: {}, + previewRecord: null + } + + constructor(props) { + super(props) + + this.columns = [{ + title: "Name", + dataIndex: "name", + sorter: true, + width: "50%", + render: (text, record) => { + return ( +
+ this.handleShowEditForm(record)}>{ text } + { record.is_default && +
Default
} +
+ ) + } + }, + { + title: "Created", + dataIndex: "created_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "Updated", + dataIndex: "updated_at", + render: (date, _) => { + return Utils.DateString(date) + } + }, + { + title: "", + dataIndex: "actions", + width: "20%", + className: "actions", + render: (text, record) => { + return ( +
+ this.handlePreview(record)}> + + { !record.is_default && + this.handleSetDefault(record)}> + + + } + + this.handleShowEditForm(record)}> + + { record.id !== 1 && + this.handleDeleteRecord(record)}> + + + } +
+ ) + } + }] + } + + componentDidMount() { + this.fetchRecords() + } + + fetchRecords = () => { + this.props.modelRequest(cs.ModelTemplates, cs.Routes.GetTemplates, cs.MethodGet) + } + + handleDeleteRecord = (record) => { + this.props.modelRequest(cs.ModelTemplates, cs.Routes.DeleteTemplate, cs.MethodDelete, { id: record.id }) + .then(() => { + notification["success"]({ placement: "topRight", message: "Template deleted", description: `"${record.name}" deleted` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handleSetDefault = (record) => { + this.props.modelRequest(cs.ModelTemplates, cs.Routes.SetDefaultTemplate, cs.MethodPut, { id: record.id }) + .then(() => { + notification["success"]({ placement: "topRight", message: "Template updated", description: `"${record.name}" set as default` }) + + // Reload the table. + this.fetchRecords() + }).catch(e => { + notification["error"]({ message: "Error", description: e.message }) + }) + } + + handlePreview = (record) => { + this.setState({ previewRecord: record }) + } + + hideForm = () => { + this.setState({ formType: null }) + } + + handleShowCreateForm = () => { + this.setState({ formType: cs.FormCreate, record: {} }) + } + + handleShowEditForm = (record) => { + this.setState({ formType: cs.FormEdit, record: record }) + } + + render() { + return ( +
+ +

Templates ({this.props.data[cs.ModelTemplates].length})

+ + + + +
+ +
record.id } + dataSource={ this.props.data[cs.ModelTemplates] } + loading={ this.props.reqStates[cs.ModelTemplates] !== cs.StateDone } + pagination={ false } + /> + + + + { this.setState({ previewRecord: null }) } }> + { this.state.previewRecord !== null && + } + + + ) + } +} + +export default Templates diff --git a/frontend/my/src/Test.js b/frontend/my/src/Test.js new file mode 100644 index 0000000..9234407 --- /dev/null +++ b/frontend/my/src/Test.js @@ -0,0 +1,41 @@ +import React from "react"; + +import ReactQuill from "react-quill" +import "react-quill/dist/quill.snow.css" + +const quillModules = { + toolbar: { + container: [ + [{"header": [1, 2, 3, false] }], + ["bold", "italic", "underline", "strike", "blockquote", "code"], + [{ "color": [] }, { "background": [] }, { 'size': [] }], + [{"list": "ordered"}, {"list": "bullet"}, {"indent": "-1"}, {"indent": "+1"}], + [{"align": ""}, { "align": "center" }, { "align": "right" }, { "align": "justify" }], + ["link", "gallery"], + ["clean", "font"] + ], + handlers: { + "gallery": function() { + + } + } + } +} + +class QuillEditor extends React.Component { + componentDidMount() { + } + + render() { + return ( +
+ +
+ ) + } +} + +export default QuillEditor; diff --git a/frontend/my/src/constants.js b/frontend/my/src/constants.js new file mode 100644 index 0000000..0ec313a --- /dev/null +++ b/frontend/my/src/constants.js @@ -0,0 +1,92 @@ +export const DateFormat = "ddd D MMM YYYY, hh:MM A" + +// Data types. +export const ModelUsers = "users" +export const ModelSubscribers = "subscribers" +export const ModelSubscribersByList = "subscribersByList" +export const ModelLists = "lists" +export const ModelMedia = "media" +export const ModelCampaigns = "campaigns" +export const ModelTemplates = "templates" + +// HTTP methods. +export const MethodGet = "get" +export const MethodPost = "post" +export const MethodPut = "put" +export const MethodDelete = "delete" + +// Data loading states. +export const StatePending = "pending" +export const StateDone = "done" + +// Form types. +export const FormCreate = "create" +export const FormEdit = "edit" + +// Message types. +export const MsgSuccess = "success" +export const MsgWarning = "warning" +export const MsgError = "error" + +// Model specific. +export const CampaignStatusColors = { + draft: "", + scheduled: "purple", + running: "blue", + paused: "orange", + finished: "green", + cancelled: "red", +} + +export const CampaignStatusDraft = "draft" +export const CampaignStatusScheduled = "scheduled" +export const CampaignStatusRunning = "running" +export const CampaignStatusPaused = "paused" +export const CampaignStatusFinished = "finished" +export const CampaignStatusCancelled = "cancelled" + +export const SubscriptionStatusConfirmed = "confirmed" +export const SubscriptionStatusUnConfirmed = "unconfirmed" +export const SubscriptionStatusUnsubscribed = "unsubscribed" + +// API routes. +export const Routes = { + GetUsers: "/api/users", + + GetLists: "/api/lists", + CreateList: "/api/lists", + UpdateList: "/api/lists/:id", + DeleteList: "/api/lists/:id", + + GetSubscribers: "/api/subscribers", + GetSubscribersByList: "/api/subscribers/lists/:listID", + CreateSubscriber: "/api/subscribers", + UpdateSubscriber: "/api/subscribers/:id", + DeleteSubscriber: "/api/subscribers/:id", + DeleteSubscribers: "/api/subscribers", + QuerySubscribersIntoLists: "/api/subscribers/lists", + + ViewCampaign: "/campaigns/:id", + GetCampaignMessengers: "/api/campaigns/messengers", + GetCampaigns: "/api/campaigns", + GetRunningCampaignStats: "/api/campaigns/running/stats", + CreateCampaign: "/api/campaigns", + UpdateCampaign: "/api/campaigns/:id", + UpdateCampaignStatus: "/api/campaigns/:id/status", + DeleteCampaign: "/api/campaigns/:id", + + GetMedia: "/api/media", + AddMedia: "/api/media", + DeleteMedia: "/api/media/:id", + + GetTemplates: "/api/templates", + PreviewTemplate: "/api/templates/:id/preview", + CreateTemplate: "/api/templates", + UpdateTemplate: "/api/templates/:id", + SetDefaultTemplate: "/api/templates/:id/default", + DeleteTemplate: "/api/templates/:id", + + UploadRouteImport: "/api/import/subscribers", + GetRouteImportStats: "/api/import/subscribers", + GetRouteImportLogs: "/api/import/subscribers/logs" +} diff --git a/frontend/my/src/index.css b/frontend/my/src/index.css new file mode 100644 index 0000000..33a78dc --- /dev/null +++ b/frontend/my/src/index.css @@ -0,0 +1,264 @@ +/* Disable all the ridiculous, unnecessary animations except for the spinner */ +*:not(.ant-spin-dot-spin) { + animation-duration: 0s; + transition: none !important; +} + +header.header { + margin-bottom: 30px; +} + +hr { + border-width: 1px 0 0 0; + border-style: solid; + border-color: #eee; + margin: 30px 0; +} + +/* Helpers */ +.center { + text-align: center; +} + +.text-tiny { + font-size: 0.65em; +} + +.text-small { + font-size: 0.85em; +} + +.text-grey { + color: #999; +} + +/* Layout */ +body { + margin: 0; + padding: 0; + font-family: sans-serif; +} + +.content-body { + background: #fff; + padding: 24px; + min-height: 90vh; +} + +.logo { + padding: 30px; +} + .logo a { + overflow: hidden; + display: inline-block; + } + .logo img { + width: auto; + height: 22px; + } + +.ant-layout-sider.ant-layout-sider-collapsed .logo a { + width: 20px; +} + +.hidden { + display: none; +} + +/* Table actions */ +td .actions a { + display: inline-block; + padding: 10px; +} + +td.actions { + text-align: right; +} + +/* Templates */ +.wysiwyg { + padding: 30px; + color: red; +} + +/* Subscribers */ +.subscriber-filter { + background: #fff; + min-width: 300px; + max-width: 500px; + width: 100%; + padding: 15px; + box-shadow: 0 1px 6px rgba(0, 0, 0, .2); +} + .subscriber-filter .lists { + width: 100%; + } + +.subscribers table .name { + margin-bottom: 10px; +} + +.subscriber-query { + margin: 15px 0 30px 0; + padding: 30px; + box-shadow: 0 1px 6px #ddd; +} + .subscriber-query textarea { + font-family: monospace; + } + .subscriber-query .actions { + margin-top: 15px; + } + +.subscriber-modal #lists .status { + color: #999; +} + .subscriber-modal #lists .status.confirmed { + color: #52c41a; + } + .subscriber-modal #lists .status.unsubscribed { + color: #ff7875; + } + +/* Import */ +.import .import-container { + margin-top: 100px; +} +.import .logs, +.import .help { + max-width: 950px; + margin-top: 30px; +} + .import .stats .ant-progress { + margin-bottom: 30px; + } +.import .csv-example { + background: #efefef; + padding: 5px 10px; + display: inline-block; +} + .import .csv-example code { + display: block; + } + .import .csv-example .csv-headers span { + font-weight: bold; + } + +/* Campaigns */ +.campaigns table tbody td { + vertical-align: top; + border-bottom-width: 3px; + border-bottom-color: #efefef; +} + .campaigns td.status .date { + display: block; + margin-top: 5px; + } + .campaigns td.lists .name { + margin-right: 15px; + } + .campaigns td hr { + margin: 10px 0; + } + + .campaigns td.stats .ant-row { + border-bottom: 1px solid #eee; + padding: 5px 0; + } + .campaigns td.stats .ant-row:last-child { + border: 0; + } + .campaigns td.stats .label { + font-weight: 600; + color: #aaa; + } + .campaigns .duration { + text-transform: capitalize; + } + +.campaign .messengers { + text-transform: capitalize; +} + .campaign .content-type .actions { + display: inline-block; + margin-left: 15px; + } + .campaign .content-actions { + margin-top: 30px; + } + +/* gallery */ +.gallery { + display:flex; + flex-direction: row; + flex-flow: wrap; +} + .gallery .image { + display: flex; + align-items: center; + justify-content: center; + + min-height: 90px; + + padding: 10px; + border: 1px solid #eee; + overflow: hidden; + margin: 10px; + text-align: center; + position: relative; + } + .gallery .name { + background: rgba(255, 255, 255, 0.8); + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 3px 5px; + width: 100%; + font-size: .75em; + + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + .gallery .actions { + position: absolute; + top: 10px; + right: 15px; + display: none; + text-align: center; + } + .gallery .actions a { + background: rgba(255, 255, 255, 0.9); + padding: 0 3px 3px 3px; + border-radius: 0 0 3px 3px; + display: inline-block; + margin-left: 5px; + } + .gallery .image:hover .actions { + display: block; + } + .gallery .image img { + max-width: 90px; + max-height: 90px; + display: block; + } + +/* gallery icon in the wsiwyg */ +.ql-gallery { + background: url('/gallery.svg'); +} + +/* templates */ +.templates .template-body { + margin-top: 30px; +} + .template-preview { + border: 0; + width: 100%; + height: 100%; + min-height: 500px; + } + .template-preview-modal .ant-modal-footer button:first-child { + display: none; + } \ No newline at end of file diff --git a/frontend/my/src/index.js b/frontend/my/src/index.js new file mode 100644 index 0000000..90fb7e3 --- /dev/null +++ b/frontend/my/src/index.js @@ -0,0 +1,8 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; + +import './index.css'; +import App from './App.js' + + +ReactDOM.render((), document.getElementById('root')) diff --git a/frontend/my/src/logo.svg b/frontend/my/src/logo.svg new file mode 100644 index 0000000..6b60c10 --- /dev/null +++ b/frontend/my/src/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/frontend/my/src/registerServiceWorker.js b/frontend/my/src/registerServiceWorker.js new file mode 100644 index 0000000..a3e6c0c --- /dev/null +++ b/frontend/my/src/registerServiceWorker.js @@ -0,0 +1,117 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export default function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://goo.gl/SC7cgQ' + ); + }); + } else { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } + }); + } +} + +function registerValidSW(swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} diff --git a/frontend/my/src/static/gallery.svg b/frontend/my/src/static/gallery.svg new file mode 100644 index 0000000..d1bd262 --- /dev/null +++ b/frontend/my/src/static/gallery.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/my/src/static/listmonk.svg b/frontend/my/src/static/listmonk.svg new file mode 100644 index 0000000..1f8306e --- /dev/null +++ b/frontend/my/src/static/listmonk.svg @@ -0,0 +1,121 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/my/src/utils.js b/frontend/my/src/utils.js new file mode 100644 index 0000000..fa8a863 --- /dev/null +++ b/frontend/my/src/utils.js @@ -0,0 +1,59 @@ +import React from 'react' +import ReactDOM from 'react-dom'; + +import { Alert } from 'antd'; + + +class Utils { + static months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ] + static days = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ] + + // Converts the ISO date format to a simpler form. + static DateString = (stamp, showTime) => { + if(!stamp) { + return "" + } + + let d = new Date(stamp) + + let out = Utils.days[d.getDay()] + ", " + d.getDate() + " " + Utils.months[d.getMonth()] + " " + d.getFullYear() + if(showTime) { + out += " " + d.getHours() + ":" + d.getMinutes() + } + + return out + } + + // HttpError takes an axios error and returns an error dict after some sanity checks. + static HttpError = (err) => { + if (!err.response) { + return err + } + + if(!err.response.data || !err.response.data.message) { + return { + "message": err.message + " - " + err.response.request.responseURL, + "data": {} + } + } + + return { + "message": err.response.data.message, + "data": err.response.data.data + } + } + + // Shows a flash message. + static Alert = (msg, msgType) => { + document.getElementById('alert-container').classList.add('visible') + ReactDOM.render(, + document.getElementById('alert-container')) + } + static ModalAlert = (msg, msgType) => { + document.getElementById('modal-alert-container').classList.add('visible') + ReactDOM.render(, + document.getElementById('modal-alert-container')) + } +} + +export default Utils diff --git a/frontend/my/yarn.lock b/frontend/my/yarn.lock new file mode 100644 index 0000000..de83229 --- /dev/null +++ b/frontend/my/yarn.lock @@ -0,0 +1,7982 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/prop-types@*": + version "15.5.6" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.6.tgz#9c03d3fed70a8d517c191b7734da2879b50ca26c" + +"@types/quill@*": + version "1.3.10" + resolved "https://registry.yarnpkg.com/@types/quill/-/quill-1.3.10.tgz#dc1f7b6587f7ee94bdf5291bc92289f6f0497613" + dependencies: + parchment "^1.1.2" + +"@types/react@*": + version "16.4.14" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.14.tgz#47c604c8e46ed674bbdf4aabf82b34b9041c6a04" + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + +abab@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +accepts@~1.3.4, accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + dependencies: + acorn "^4.0.3" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.3, acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.0.0, acorn@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + +add-dom-event-listener@1.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.0.2.tgz#8faed2c41008721cf111da1d30d995b85be42bed" + dependencies: + object-assign "4.x" + +address@1.0.3, address@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" + +ajv-keywords@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + +ajv-keywords@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" + +ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.0.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-align@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + dependencies: + string-width "^2.0.0" + +ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + +ansi-regex@^2.0.0, ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +antd@^3.6.5: + version "3.8.1" + resolved "https://registry.yarnpkg.com/antd/-/antd-3.8.1.tgz#1780acd5e9bc6c80dc23b042161418eb88f4d80e" + dependencies: + array-tree-filter "^2.0.0" + babel-runtime "6.x" + classnames "~2.2.0" + create-react-class "^15.6.0" + create-react-context "^0.2.2" + css-animation "^1.2.5" + dom-closest "^0.2.0" + enquire.js "^2.1.1" + intersperse "^1.0.0" + lodash "^4.17.5" + moment "^2.19.3" + omit.js "^1.0.0" + prop-types "^15.5.7" + raf "^3.4.0" + rc-animate "^2.4.1" + rc-calendar "~9.6.0" + rc-cascader "~0.14.0" + rc-checkbox "~2.1.5" + rc-collapse "~1.9.0" + rc-dialog "~7.2.0" + rc-drawer "~1.6.2" + rc-dropdown "~2.2.0" + rc-editor-mention "^1.0.2" + rc-form "^2.1.0" + rc-input-number "~4.0.0" + rc-menu "~7.0.2" + rc-notification "~3.2.0" + rc-pagination "~1.16.1" + rc-progress "~2.2.2" + rc-rate "~2.4.0" + rc-select "~8.1.1" + rc-slider "~8.6.0" + rc-steps "~3.1.0" + rc-switch "~1.6.0" + rc-table "~6.2.0" + rc-tabs "~9.3.3" + rc-time-picker "~3.3.0" + rc-tooltip "~3.7.0" + rc-tree "~1.13.0" + rc-tree-select "~2.0.5" + rc-trigger "^2.5.4" + rc-upload "~2.5.0" + rc-util "^4.0.4" + react-lazy-load "^3.0.12" + react-lifecycles-compat "^3.0.2" + react-slick "~0.23.1" + shallowequal "^1.0.1" + warning "~4.0.1" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + dependencies: + default-require-extensions "^2.0.0" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +aria-query@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.1.tgz#26cbb5aff64144b0a825be1846e0b16cfa00b11e" + dependencies: + ast-types-flow "0.0.7" + commander "^2.11.0" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-flatten@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + +array-tree-filter@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-tree-filter/-/array-tree-filter-1.0.1.tgz#0a8ad1eefd38ce88858632f9cc0423d7634e4d5d" + +array-tree-filter@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-tree-filter/-/array-tree-filter-2.1.0.tgz#873ac00fec83749f255ac8dd083814b4f6329190" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +ast-types-flow@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async-validator@1.x: + version "1.8.5" + resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.8.5.tgz#dc3e08ec1fd0dddb67e60842f02c0cd1cec6d7f0" + dependencies: + babel-runtime "6.x" + +async@^1.4.0, async@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.2, async@^2.1.4, async@^2.4.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + dependencies: + lodash "^4.17.10" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + +autoprefixer@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7" + dependencies: + browserslist "^2.5.1" + caniuse-lite "^1.0.30000748" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^6.0.13" + postcss-value-parser "^3.2.3" + +autoprefixer@^6.3.1: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + +axios@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" + dependencies: + follow-redirects "^1.3.0" + is-buffer "^1.1.5" + +axobject-query@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" + dependencies: + ast-types-flow "0.0.7" + +babel-code-frame@6.26.0, babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-core@^6.0.0, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-eslint@7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" + dependencies: + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.17.0" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@20.0.3, babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" + +babel-loader@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" + dependencies: + find-cache-dir "^1.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-dynamic-import-node@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz#bd1d88ac7aaf98df4917c384373b04d971a2b37a" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.6" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.10.1" + test-exclude "^4.2.1" + +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-dynamic-import@6.18.0, babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-properties@6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@6.23.0, babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-react-constant-elements@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz#2f119bf4d2cdd45eb9baaae574053c604f6147dd" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-display-name@^6.23.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@6.22.0, babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@6.22.0, babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@6.24.1, babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@6.26.0, babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-runtime@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-preset-env@1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" + dependencies: + babel-plugin-jest-hoist "^20.0.3" + +babel-preset-react-app@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/babel-preset-react-app/-/babel-preset-react-app-3.1.2.tgz#49ba3681b917c4e5c73a5249d3ef4c48fae064e2" + dependencies: + babel-plugin-dynamic-import-node "1.1.0" + babel-plugin-syntax-dynamic-import "6.18.0" + babel-plugin-transform-class-properties "6.24.1" + babel-plugin-transform-es2015-destructuring "6.23.0" + babel-plugin-transform-object-rest-spread "6.26.0" + babel-plugin-transform-react-constant-elements "6.23.0" + babel-plugin-transform-react-jsx "6.24.1" + babel-plugin-transform-react-jsx-self "6.22.0" + babel-plugin-transform-react-jsx-source "6.22.0" + babel-plugin-transform-regenerator "6.26.0" + babel-plugin-transform-runtime "6.23.0" + babel-preset-env "1.6.1" + babel-preset-react "6.24.1" + +babel-preset-react@6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@6.26.0, babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.0, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-js@^1.0.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + dependencies: + tweetnacl "^0.14.3" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +bluebird@^3.4.7: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +boxen@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + dependencies: + ansi-align "^2.0.0" + camelcase "^4.0.0" + chalk "^2.0.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^1.2.0" + widest-line "^2.0.0" + +brace-expansion@^1.0.0, brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.0, braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browser-resolve@^1.11.2: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + dependencies: + resolve "1.1.7" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.1.tgz#3343124db6d7ad53e26a8826318712bdc8450f9c" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + dependencies: + pako "~1.0.5" + +browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +browserslist@^2.1.2, browserslist@^2.5.1: + version "2.11.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" + dependencies: + caniuse-lite "^1.0.30000792" + electron-to-chromium "^1.3.30" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-modules@^1.0.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.0.0, camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-api@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" + dependencies: + browserslist "^1.3.6" + caniuse-db "^1.0.30000529" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000864" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000864.tgz#35a4b2325a8d4553a46b516dbc233bf391d75555" + +caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000792: + version "1.0.30000864" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz#7a08c78da670f23c06f11aa918831b8f2dd60ddc" + +capture-stack-trace@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + +case-sensitive-paths-webpack-plugin@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@1.1.3, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + +chokidar@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chokidar@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.5" + optionalDependencies: + fsevents "^1.2.2" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +ci-info@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + +clap@^1.0.9: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51" + dependencies: + chalk "^1.1.3" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classnames@2.x, classnames@^2.2.0, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@~2.2.0: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + +clean-css@4.1.x: + version "4.1.11" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a" + dependencies: + source-map "0.5.x" + +cli-boxes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + +clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +coa@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" + dependencies: + q "^1.1.2" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.3.0, color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + +color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + +color-name@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +combined-stream@1.0.6, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +commander@2.16.x, commander@^2.11.0, commander@~2.16.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +compare-versions@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" + +component-classes@1.x, component-classes@^1.2.5, component-classes@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/component-classes/-/component-classes-1.2.6.tgz#c642394c3618a4d8b0b8919efccbbd930e5cd691" + dependencies: + component-indexof "0.0.3" + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + +component-indexof@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/component-indexof/-/component-indexof-0.0.3.tgz#11d091312239eb8f32c8f25ae9cb002ffe8d3c24" + +compressible@~2.0.13: + version "2.0.14" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7" + dependencies: + mime-db ">= 1.34.0 < 2" + +compression@^1.5.2: + version "1.7.2" + resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.13" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +configstore@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +connect-history-api-fallback@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type-parser@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.2.2.tgz#6173cebd56fac042c1f4390edf7af6c07c7cb892" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-error-class@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + dependencies: + capture-stack-trace "^1.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-react-class@^15.5.2, create-react-class@^15.5.3, create-react-class@^15.6.0: + version "15.6.3" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +create-react-context@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" + dependencies: + fbjs "^0.8.0" + gud "^1.0.0" + +cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + +css-animation@1.x, css-animation@^1.2.5, css-animation@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/css-animation/-/css-animation-1.4.1.tgz#5b8813125de0fbbbb0bbe1b472ae84221469b7a8" + dependencies: + babel-runtime "6.x" + component-classes "^1.2.5" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css-loader@0.28.7: + version "0.28.7" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.7.tgz#5f2ee989dd32edd907717f953317656160999c1b" + dependencies: + babel-code-frame "^6.11.0" + css-selector-tokenizer "^0.7.0" + cssnano ">=2.6.1 <4" + icss-utils "^2.1.0" + loader-utils "^1.0.2" + lodash.camelcase "^4.3.0" + object-assign "^4.0.1" + postcss "^5.0.6" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.0" + postcss-value-parser "^3.3.0" + source-list-map "^2.0.0" + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +"cssnano@>=2.6.1 <4": + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +csstype@^2.2.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.7.tgz#bf9235d5872141eccfb2d16d82993c6b149179ff" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +damerau-levenshtein@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +dayjs@^1.7.5: + version "1.7.5" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.7.5.tgz#14715cb565d1f8cb556a8531cb14bf1fc33067cc" + +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.0.1, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + dependencies: + strip-bom "^3.0.0" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.0.2, del@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +del@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" + dependencies: + globby "^6.1.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + p-map "^1.1.1" + pify "^3.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +depd@~1.1.1, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-node@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" + +detect-port-alt@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" + dependencies: + address "^1.0.1" + debug "^2.6.0" + +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + dependencies: + buffer-indexof "^1.0.0" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + +dom-align@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.8.0.tgz#c0e89b5b674c6e836cd248c52c2992135f093654" + +dom-closest@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-closest/-/dom-closest-0.2.0.tgz#ebd9f91d1bf22e8d6f477876bbcd3ec90216c0cf" + dependencies: + dom-matches ">=1.0.1" + +dom-converter@~0.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" + dependencies: + utila "~0.3" + +dom-matches@>=1.0.1: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-matches/-/dom-matches-2.0.0.tgz#d2728b416a87533980eb089b848d253cf23a758c" + +dom-scroll-into-view@1.x, dom-scroll-into-view@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz#e8f36732dd089b0201a88d7815dc3f88e6d66c7e" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +dom-urls@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/dom-urls/-/dom-urls-1.1.0.tgz#001ddf81628cd1e706125c7176f53ccec55d918e" + dependencies: + urijs "^1.16.1" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" + dependencies: + domelementtype "1" + +domutils@1.1: + version "1.1.6" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + dependencies: + is-obj "^1.0.0" + +dotenv-expand@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-4.2.0.tgz#def1f1ca5d6059d24a766e587942c21106ce1275" + +dotenv@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" + +draft-js@^0.10.0, draft-js@~0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.5.tgz#bfa9beb018fe0533dbb08d6675c371a6b08fa742" + dependencies: + fbjs "^0.8.15" + immutable "~3.7.4" + object-assign "^4.1.0" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: + version "1.3.51" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz#6a42b49daaf7f22a5b37b991daf949f34dbdb9b5" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^6.1.0: + version "6.5.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +enhanced-resolve@^3.4.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +enquire.js@^2.1.1, enquire.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/enquire.js/-/enquire.js-2.1.6.tgz#3e8780c9b8b835084c3f60e166dbc3c2a3c89814" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.7.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.45" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.45.tgz#0bfdf7b473da5919d5adf3bd25ceb754fccc3653" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "1" + +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-promise@^4.0.5: + version "4.2.4" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e" + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-react-app@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-2.1.0.tgz#23c909f71cbaff76b945b831d2d814b8bde169eb" + +eslint-import-resolver-node@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" + dependencies: + debug "^2.6.9" + resolve "^1.5.0" + +eslint-loader@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.9.0.tgz#7e1be9feddca328d3dcfaef1ad49d5beffe83a13" + dependencies: + loader-fs-cache "^1.0.0" + loader-utils "^1.0.2" + object-assign "^4.0.1" + object-hash "^1.1.4" + rimraf "^2.6.1" + +eslint-module-utils@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" + dependencies: + debug "^2.6.8" + pkg-dir "^1.0.0" + +eslint-plugin-flowtype@2.39.1: + version "2.39.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.39.1.tgz#b5624622a0388bcd969f4351131232dcb9649cd5" + dependencies: + lodash "^4.15.0" + +eslint-plugin-import@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.1.1" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + +eslint-plugin-jsx-a11y@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1" + dependencies: + aria-query "^0.7.0" + array-includes "^3.0.3" + ast-types-flow "0.0.7" + axobject-query "^0.1.0" + damerau-levenshtein "^1.0.0" + emoji-regex "^6.1.0" + jsx-ast-utils "^1.4.0" + +eslint-plugin-react@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a" + dependencies: + doctrine "^2.0.0" + has "^1.0.1" + jsx-ast-utils "^2.0.0" + prop-types "^15.5.10" + +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.10.0.tgz#f25d0d7955c81968c2309aa5c9a229e045176bb7" + dependencies: + ajv "^5.2.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.0.1" + doctrine "^2.0.0" + eslint-scope "^3.7.1" + espree "^3.5.1" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "^4.0.1" + text-table "~0.2.0" + +espree@^3.5.1: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esquery@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba" + +eventemitter3@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" + +eventlistener@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/eventlistener/-/eventlistener-0.0.1.tgz#ed2baabb852227af2bcf889152c72c63ca532eb8" + +events@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +eventsource@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" + dependencies: + original ">=0.0.5" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exec-sh@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + dependencies: + merge "^1.2.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + dependencies: + homedir-polyfill "^1.0.1" + +express@^4.13.3: + version "4.16.3" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53" + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.3" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.1, extend@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + +extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extract-text-webpack-plugin@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz#5f043eaa02f9750a9258b78c0a6e0dc1408fb2f7" + dependencies: + async "^2.4.1" + loader-utils "^1.1.0" + schema-utils "^0.3.0" + webpack-sources "^1.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + +fast-diff@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" + dependencies: + websocket-driver ">=0.5.1" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +fbjs@^0.8.0, fbjs@^0.8.15, fbjs@^0.8.16, fbjs@^0.8.9: + version "0.8.17" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +file-loader@1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.5.tgz#91c25b6b6fbe56dae99f10a425fd64933b5c9daa" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.3.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +filesize@3.5.11: + version "3.5.11" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +follow-redirects@^1.0.0, follow-redirects@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.1.tgz#67a8f14f5a1f67f962c2c46469c79eaec0a90291" + dependencies: + debug "^3.1.0" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +fs-extra@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0, fsevents@^1.1.3, fsevents@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-dirs@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + dependencies: + ini "^1.3.4" + +global-modules@1.0.0, global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +globals@^9.17.0, globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +got@^6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + dependencies: + create-error-class "^3.0.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + unzip-response "^2.0.1" + url-parse-lax "^1.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +gud@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" + +gzip-size@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" + dependencies: + duplexer "^0.1.1" + +hammerjs@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" + +handle-thing@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" + +handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.4.tgz#8b50e1f35d51bd01e5ed9ece4dbe3549ccfa0a3c" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +he@1.1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +history@^4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" + dependencies: + invariant "^2.2.1" + loose-envify "^1.2.0" + resolve-pathname "^2.2.0" + value-equal "^0.4.0" + warning "^3.0.0" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +homedir-polyfill@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +html-encoding-sniffer@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + dependencies: + whatwg-encoding "^1.0.1" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +html-minifier@^3.2.3: + version "3.5.18" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.18.tgz#fc8b02826cbbafc6de19a103c41c830a91cffe5a" + dependencies: + camel-case "3.0.x" + clean-css "4.1.x" + commander "2.16.x" + he "1.1.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-webpack-plugin@2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.29.0.tgz#e987f421853d3b6938c8c4c8171842e5fd17af23" + dependencies: + bluebird "^3.4.7" + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + toposort "^1.0.0" + +htmlparser2@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" + dependencies: + domelementtype "1" + domhandler "2.1" + domutils "1.1" + readable-stream "1.0" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + +http-errors@1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.4.0: + version "0.4.13" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.13.tgz#3bd6d6fde6e3172c9334c3b33b6c193d80fe1137" + +http-proxy-middleware@~0.17.4: + version "0.17.4" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" + dependencies: + http-proxy "^1.16.2" + is-glob "^3.1.0" + lodash "^4.17.2" + micromatch "^2.3.11" + +http-proxy@^1.16.2: + version "1.17.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" + dependencies: + eventemitter3 "^3.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +icss-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" + dependencies: + postcss "^6.0.1" + +ieee754@^1.1.4: + version "1.1.12" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +ignore@^3.3.3: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + +immutable@^3.7.4: + version "3.8.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" + +immutable@~3.7.4: + version "3.7.6" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" + +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + +import-local@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +ini@^1.3.4, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +inquirer@3.3.0, inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +internal-ip@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" + dependencies: + meow "^3.3.0" + +interpret@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + +intersperse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/intersperse/-/intersperse-1.0.0.tgz#f2561fb1cfef9f5277cc3347a22886b4351a5181" + +invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + +ipaddr.js@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + +is-ci@^1.0.10: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + dependencies: + ci-info "^1.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + dependencies: + is-extglob "^2.1.1" + +is-installed-globally@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" + dependencies: + global-dirs "^0.1.0" + is-path-inside "^1.0.0" + +is-negative-zero@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" + +is-npm@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-redirect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + +is-retry-allowed@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + +is-root@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-root/-/is-root-1.0.0.tgz#07b6c233bc394cd9d02ba15c966bd6660d6342d5" + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^1.0.1, is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + dependencies: + async "^2.1.4" + compare-versions "^3.1.0" + fileset "^2.0.2" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-hook "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-report "^1.1.4" + istanbul-lib-source-maps "^1.2.4" + istanbul-reports "^1.3.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" + +istanbul-lib-hook@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + dependencies: + append-transform "^1.0.0" + +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.4.2: + version "1.10.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.0" + semver "^5.3.0" + +istanbul-lib-report@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" + dependencies: + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-lib-source-maps@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" + +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.4" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.4" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^7.0.2" + +jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" + dependencies: + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.4" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + dependencies: + chalk "^1.1.3" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" + +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" + +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + +jest-haste-map@^20.0.4: + version "20.0.5" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.5.tgz#abad74efb1a005974a7b6517e11010709cab9112" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" + micromatch "^2.3.11" + sane "~1.6.0" + worker-farm "^1.3.1" + +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" + +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" + dependencies: + chalk "^1.1.3" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" + dependencies: + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" + +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" + dependencies: + jest-regex-util "^20.0.3" + +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" + dependencies: + browser-resolve "^1.11.2" + is-builtin-module "^1.0.0" + resolve "^1.3.2" + +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" + dependencies: + babel-core "^6.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.4" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^7.0.2" + +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" + dependencies: + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" + natural-compare "^1.4.0" + pretty-format "^20.0.3" + +jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" + mkdirp "^0.5.1" + +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +jest@20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" + dependencies: + jest-cli "^20.0.4" + +js-base64@^2.1.9: + version "2.4.5" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json2mq@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/json2mq/-/json2mq-0.2.0.tgz#b637bd3ba9eabe122c83e9720483aeb10d2c904a" + dependencies: + string-convert "^0.2.0" + +json3@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jsx-ast-utils@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +jsx-ast-utils@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" + dependencies: + array-includes "^3.0.3" + +killable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +latest-version@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" + dependencies: + package-json "^4.0.0" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +loader-fs-cache@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc" + dependencies: + find-cache-dir "^0.1.1" + mkdirp "0.5.1" + +loader-runner@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + +lodash.cond@^4.3.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" + +lodash.debounce@^4.0.0, lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.template@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash.throttle@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +"lodash@>=3.5 <5", lodash@^4.15.0, lodash@^4.16.5, lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +loglevel@^1.4.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0, loose-envify@^1.2.0, loose-envify@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loose-envify@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + +lru-cache@^4.0.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + dependencies: + pify "^3.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + +math-expression-evaluator@^1.2.14: + version "1.2.17" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" + +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +merge@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4, micromatch@^3.1.8: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +"mime-db@>= 1.34.0 < 2": + version "1.34.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.34.0.tgz#452d0ecff5c30346a6dc1e64b1eaee0d3719ff9a" + +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^1.4.1, mime@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + +mini-store@^1.0.2, mini-store@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/mini-store/-/mini-store-1.1.2.tgz#cc150e0878e080ca58219d47fccefefe2c9aea3e" + dependencies: + hoist-non-react-statics "^2.3.1" + prop-types "^15.6.0" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.0.2" + +minimalistic-assert@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +minimatch@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +moment@2.x, moment@^2.19.3: + version "2.22.2" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +nan@^2.9.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +needle@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +neo-async@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" + +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-forge@0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-libs-browser@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^1.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.0" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.10.3" + vm-browserify "0.0.4" + +node-notifier@^5.0.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + dependencies: + growly "^1.3.0" + semver "^5.4.1" + shellwords "^0.1.1" + which "^1.3.0" + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" + +oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@4.1.1, object-assign@4.x, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-hash@^1.1.4: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.0.tgz#76d9ba6ff113cf8efc0d996102851fe6723963e2" + +object-keys@^1.0.8: + version "1.0.12" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + +obuf@^1.0.0, obuf@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + +omit.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/omit.js/-/omit.js-1.0.0.tgz#e013cb86a7517b9cf6f7cfb0ddb4297256a99288" + dependencies: + babel-runtime "^6.23.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +opn@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.2.0.tgz#71fdf934d6827d676cecbea1531f95d354641225" + dependencies: + is-wsl "^1.1.0" + +opn@^5.1.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + dependencies: + is-wsl "^1.1.0" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +original@>=0.0.5: + version "1.0.1" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.1.tgz#b0a53ff42ba997a8c9cd1fb5daaeb42b9d693190" + dependencies: + url-parse "~1.4.0" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + +package-json@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" + dependencies: + got "^6.7.1" + registry-auth-token "^3.0.1" + registry-url "^3.0.3" + semver "^5.1.0" + +pako@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + +parchment@^1.1.2, parchment@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/parchment/-/parchment-1.1.4.tgz#aeded7ab938fe921d4c34bc339ce1168bc2ffde5" + +parse-asn1@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-to-regexp@^1.0.1, path-to-regexp@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.16" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + +portfinder@^1.0.9: + version "1.0.13" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-filter-plugins@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec" + dependencies: + postcss "^5.0.4" + +postcss-flexbugs-fixes@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.2.0.tgz#9b8b932c53f9cf13ba0f61875303e447c33dcc51" + dependencies: + postcss "^6.0.1" + +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-loader@2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.8.tgz#8c67ddb029407dfafe684a406cfc16bad2ce0814" + dependencies: + loader-utils "^1.1.0" + postcss "^6.0.0" + postcss-load-config "^1.2.0" + schema-utils "^0.3.0" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-modules-extract-imports@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-scope@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: + version "5.2.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.13: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +prepend-http@^1.0.0, prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-bytes@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" + dependencies: + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" + +private@^0.1.6, private@^0.1.7, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + +promise@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.0.1.tgz#e45d68b00a17647b6da711bf85ed6ed47208f450" + dependencies: + asap "~2.0.3" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types@15.x, prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0, prop-types@^15.6.1: + version "15.6.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" + dependencies: + loose-envify "^1.3.1" + object-assign "^4.1.1" + +proxy-addr@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.6.0" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +psl@^1.1.24: + version "1.1.28" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.28.tgz#4fb6ceb08a1e2214d4fd4de0ca22dae13740bc7b" + +public-encrypt@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + +q@^1.1.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + +qs@6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +qs@~6.5.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + +query-string@^4.1.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +querystringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755" + +quill-delta@^3.6.2: + version "3.6.3" + resolved "https://registry.yarnpkg.com/quill-delta/-/quill-delta-3.6.3.tgz#b19fd2b89412301c60e1ff213d8d860eac0f1032" + dependencies: + deep-equal "^1.0.1" + extend "^3.0.2" + fast-diff "1.1.2" + +quill@^1.2.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/quill/-/quill-1.3.6.tgz#99f4de1fee85925a0d7d4163b6d8328f23317a4d" + dependencies: + clone "^2.1.1" + deep-equal "^1.0.1" + eventemitter3 "^2.0.3" + extend "^3.0.1" + parchment "^1.1.4" + quill-delta "^3.6.2" + +raf@3.4.0, raf@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" + dependencies: + performance-now "^2.1.0" + +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.0.3, range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +rc-align@^2.4.0, rc-align@^2.4.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-2.4.3.tgz#b9b3c2a6d68adae71a8e1d041cd5e3b2a655f99a" + dependencies: + babel-runtime "^6.26.0" + dom-align "^1.7.0" + prop-types "^15.5.8" + rc-util "^4.0.4" + +rc-animate@2.x, rc-animate@^2.3.0, rc-animate@^2.4.1: + version "2.4.4" + resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-2.4.4.tgz#a05a784c747beef140d99ff52b6117711bef4b1e" + dependencies: + babel-runtime "6.x" + css-animation "^1.3.2" + prop-types "15.x" + +rc-animate@3.0.0-rc.1: + version "3.0.0-rc.1" + resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-3.0.0-rc.1.tgz#39703e5be6d35c0c50ae53126a6c2424e5ec9405" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + component-classes "^1.2.6" + fbjs "^0.8.16" + prop-types "15.x" + raf "^3.4.0" + rc-util "^4.5.0" + react-lifecycles-compat "^3.0.4" + +rc-animate@^3.0.0-rc.1, rc-animate@^3.0.0-rc.4: + version "3.0.0-rc.4" + resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-3.0.0-rc.4.tgz#caddbd849f01d987965c6237afe64167679497bd" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + component-classes "^1.2.6" + fbjs "^0.8.16" + prop-types "15.x" + raf "^3.4.0" + rc-util "^4.5.0" + react-lifecycles-compat "^3.0.4" + +rc-calendar@~9.6.0: + version "9.6.2" + resolved "https://registry.yarnpkg.com/rc-calendar/-/rc-calendar-9.6.2.tgz#c7309db41225f4b8c81d5a1dcbe46d8ce07b6aee" + dependencies: + babel-runtime "6.x" + classnames "2.x" + create-react-class "^15.5.2" + moment "2.x" + prop-types "^15.5.8" + rc-trigger "^2.2.0" + rc-util "^4.1.1" + +rc-cascader@~0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/rc-cascader/-/rc-cascader-0.14.0.tgz#a956c99896f10883bf63d46fb894d0cb326842a4" + dependencies: + array-tree-filter "^1.0.0" + prop-types "^15.5.8" + rc-trigger "^2.2.0" + rc-util "^4.0.4" + shallow-equal "^1.0.0" + warning "^4.0.1" + +rc-checkbox@~2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/rc-checkbox/-/rc-checkbox-2.1.5.tgz#411858448c0ee2a797ef8544dac63bcaeef722ef" + dependencies: + babel-runtime "^6.23.0" + classnames "2.x" + prop-types "15.x" + rc-util "^4.0.4" + +rc-collapse@~1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/rc-collapse/-/rc-collapse-1.9.3.tgz#d9741db06a823353e1fd1aec3ba4c0f9d8af4b26" + dependencies: + classnames "2.x" + css-animation "1.x" + prop-types "^15.5.6" + rc-animate "2.x" + +rc-dialog@~7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/rc-dialog/-/rc-dialog-7.2.0.tgz#b56a2d3a56003437d6ff8917eac6b0fc601936ab" + dependencies: + babel-runtime "6.x" + rc-animate "2.x" + rc-util "^4.4.0" + +rc-drawer@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/rc-drawer/-/rc-drawer-1.6.3.tgz#f866b7fbde2d307b59cfd06c015ae697017db388" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + prop-types "^15.5.0" + rc-util "^4.5.1" + +rc-dropdown@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/rc-dropdown/-/rc-dropdown-2.2.0.tgz#a905067666ce73c0ce26cf0980e7b75b46126825" + dependencies: + babel-runtime "^6.26.0" + prop-types "^15.5.8" + rc-trigger "^2.5.1" + react-lifecycles-compat "^3.0.2" + +rc-editor-core@~0.8.3: + version "0.8.6" + resolved "https://registry.yarnpkg.com/rc-editor-core/-/rc-editor-core-0.8.6.tgz#e48b288286effb3272cbc9c6f801450dcdb0b247" + dependencies: + babel-runtime "^6.26.0" + classnames "^2.2.5" + draft-js "^0.10.0" + immutable "^3.7.4" + lodash "^4.16.5" + prop-types "^15.5.8" + setimmediate "^1.0.5" + +rc-editor-mention@^1.0.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/rc-editor-mention/-/rc-editor-mention-1.1.7.tgz#c72d181859beda96669f4b43e19a941e68fa985b" + dependencies: + babel-runtime "^6.23.0" + classnames "^2.2.5" + dom-scroll-into-view "^1.2.0" + draft-js "~0.10.0" + prop-types "^15.5.8" + rc-animate "^2.3.0" + rc-editor-core "~0.8.3" + +rc-form@^2.1.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/rc-form/-/rc-form-2.2.1.tgz#9c6d968f1460fd3872d2e9371324d717775af260" + dependencies: + async-validator "1.x" + babel-runtime "6.x" + create-react-class "^15.5.3" + dom-scroll-into-view "1.x" + hoist-non-react-statics "^2.3.1" + lodash "^4.17.4" + warning "^3.0.0" + +rc-hammerjs@~0.6.0: + version "0.6.9" + resolved "https://registry.yarnpkg.com/rc-hammerjs/-/rc-hammerjs-0.6.9.tgz#9a4ddbda1b2ec8f9b9596091a6a989842a243907" + dependencies: + babel-runtime "6.x" + hammerjs "^2.0.8" + prop-types "^15.5.9" + +rc-input-number@~4.0.0: + version "4.0.12" + resolved "https://registry.yarnpkg.com/rc-input-number/-/rc-input-number-4.0.12.tgz#99b62f0b2395e1e76c9f72142b4ad7ea46f97d06" + dependencies: + babel-runtime "6.x" + classnames "^2.2.0" + is-negative-zero "^2.0.0" + prop-types "^15.5.7" + rc-util "^4.5.1" + rmc-feedback "^2.0.0" + +rc-menu@^7.0.2: + version "7.2.6" + resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-7.2.6.tgz#b18b8da9d637533145c6bc28cae1f29ae55c8dc7" + dependencies: + babel-runtime "6.x" + classnames "2.x" + dom-scroll-into-view "1.x" + mini-store "^1.1.0" + prop-types "^15.5.6" + rc-animate "2.x" + rc-trigger "^2.3.0" + rc-util "^4.1.0" + +rc-menu@~7.0.2: + version "7.0.5" + resolved "https://registry.yarnpkg.com/rc-menu/-/rc-menu-7.0.5.tgz#986b65df5ad227aadf399ea374b98d2313802316" + dependencies: + babel-runtime "6.x" + classnames "2.x" + dom-scroll-into-view "1.x" + mini-store "^1.1.0" + prop-types "^15.5.6" + rc-animate "2.x" + rc-trigger "^2.3.0" + rc-util "^4.1.0" + +rc-notification@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/rc-notification/-/rc-notification-3.2.0.tgz#bbfb6a92c4e54c9eeb7ac51a7e8c64011ea12ab1" + dependencies: + babel-runtime "6.x" + classnames "2.x" + prop-types "^15.5.8" + rc-animate "2.x" + rc-util "^4.0.4" + +rc-pagination@~1.16.1: + version "1.16.5" + resolved "https://registry.yarnpkg.com/rc-pagination/-/rc-pagination-1.16.5.tgz#550a758035e1957ccfa2f71ee6e55657da729679" + dependencies: + babel-runtime "6.x" + prop-types "^15.5.7" + +rc-progress@~2.2.2: + version "2.2.5" + resolved "https://registry.yarnpkg.com/rc-progress/-/rc-progress-2.2.5.tgz#e61d0544bf9d4208e5ba32fc50962159e7f952a3" + dependencies: + babel-runtime "6.x" + prop-types "^15.5.8" + +rc-rate@~2.4.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/rc-rate/-/rc-rate-2.4.2.tgz#c097bfdba7a5783cec287c928b1461cc1621f836" + dependencies: + babel-runtime "^6.26.0" + classnames "^2.2.5" + prop-types "^15.5.8" + rc-util "^4.3.0" + +rc-select@~8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/rc-select/-/rc-select-8.1.1.tgz#89335cf0af518affe201bb6beefe161e1b4b2ab6" + dependencies: + babel-runtime "^6.23.0" + classnames "2.x" + component-classes "1.x" + dom-scroll-into-view "1.x" + prop-types "^15.5.8" + raf "^3.4.0" + rc-animate "2.x" + rc-menu "^7.0.2" + rc-trigger "^2.2.0" + rc-util "^4.0.4" + react-lifecycles-compat "^3.0.2" + warning "^3.0.0" + +rc-slider@~8.6.0: + version "8.6.1" + resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-8.6.1.tgz#ee5e0380dbdf4b5de6955a265b0d4ff6196405d1" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + prop-types "^15.5.4" + rc-tooltip "^3.7.0" + rc-util "^4.0.4" + shallowequal "^1.0.1" + warning "^3.0.0" + +rc-steps@~3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/rc-steps/-/rc-steps-3.1.1.tgz#79583ad808309d82b8e011676321d153fd7ca403" + dependencies: + babel-runtime "^6.23.0" + classnames "^2.2.3" + lodash "^4.17.5" + prop-types "^15.5.7" + +rc-switch@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/rc-switch/-/rc-switch-1.6.0.tgz#c2d7369bdb87c1fd45e84989a27c1fb2f201d2fd" + dependencies: + babel-runtime "^6.23.0" + classnames "^2.2.1" + prop-types "^15.5.6" + +rc-table@~6.2.0: + version "6.2.8" + resolved "https://registry.yarnpkg.com/rc-table/-/rc-table-6.2.8.tgz#c06bf48bfab60754ab3f70102290e41e8b32388e" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + component-classes "^1.2.6" + lodash "^4.17.5" + mini-store "^1.0.2" + prop-types "^15.5.8" + rc-util "^4.0.4" + react-lifecycles-compat "^3.0.2" + shallowequal "^1.0.2" + warning "^3.0.0" + +rc-tabs@~9.3.3: + version "9.3.6" + resolved "https://registry.yarnpkg.com/rc-tabs/-/rc-tabs-9.3.6.tgz#873890b3a68164a5814f89e343270b1ce9eb6acd" + dependencies: + babel-runtime "6.x" + classnames "2.x" + lodash "^4.17.5" + prop-types "15.x" + rc-hammerjs "~0.6.0" + rc-util "^4.0.4" + warning "^3.0.0" + +rc-time-picker@~3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/rc-time-picker/-/rc-time-picker-3.3.1.tgz#94f8bbd51e6b93de1f01e78064aef1e6d765b367" + dependencies: + babel-runtime "6.x" + classnames "2.x" + moment "2.x" + prop-types "^15.5.8" + rc-trigger "^2.2.0" + +rc-tooltip@^3.7.0, rc-tooltip@~3.7.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-3.7.2.tgz#3698656d4bacd51b72d9e327bed15d1d5a9f1b27" + dependencies: + babel-runtime "6.x" + prop-types "^15.5.8" + rc-trigger "^2.2.2" + +rc-tree-select@~2.0.5: + version "2.0.13" + resolved "https://registry.yarnpkg.com/rc-tree-select/-/rc-tree-select-2.0.13.tgz#7bd1d5de61cb69d8048bf0d29dc3785aee6815db" + dependencies: + babel-runtime "^6.23.0" + classnames "^2.2.1" + prop-types "^15.5.8" + raf "^3.4.0" + rc-animate "^3.0.0-rc.4" + rc-tree "~1.12.2" + rc-trigger "^3.0.0-rc.2" + rc-util "^4.5.0" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.0.2" + warning "^4.0.1" + +rc-tree@~1.12.2: + version "1.12.7" + resolved "https://registry.yarnpkg.com/rc-tree/-/rc-tree-1.12.7.tgz#94ce4b59d27325c555d6238c7b92feeaa5d476a0" + dependencies: + babel-runtime "^6.23.0" + classnames "2.x" + prop-types "^15.5.8" + rc-animate "2.x" + rc-util "^4.0.4" + warning "^3.0.0" + +rc-tree@~1.13.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/rc-tree/-/rc-tree-1.13.2.tgz#47cd31a51871f26f50e34167d9dcf36a68c44955" + dependencies: + babel-runtime "^6.23.0" + classnames "2.x" + prop-types "^15.5.8" + rc-animate "3.0.0-rc.1" + rc-util "^4.5.1" + react-lifecycles-compat "^3.0.4" + warning "^3.0.0" + +rc-trigger@^2.2.0, rc-trigger@^2.2.2, rc-trigger@^2.3.0, rc-trigger@^2.5.1, rc-trigger@^2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-2.5.4.tgz#9088a24ba5a811b254f742f004e38a9e2f8843fb" + dependencies: + babel-runtime "6.x" + classnames "^2.2.6" + prop-types "15.x" + rc-align "^2.4.0" + rc-animate "2.x" + rc-util "^4.4.0" + +rc-trigger@^3.0.0-rc.2: + version "3.0.0-rc.3" + resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-3.0.0-rc.3.tgz#35842df1674d25315e1426a44882a4c97652258b" + dependencies: + babel-runtime "6.x" + classnames "^2.2.6" + prop-types "15.x" + raf "^3.4.0" + rc-align "^2.4.1" + rc-animate "^3.0.0-rc.1" + rc-util "^4.4.0" + +rc-upload@~2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/rc-upload/-/rc-upload-2.5.1.tgz#7ae0c9038d98ba8750e9466d8f969e1b4bc9f0e0" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + prop-types "^15.5.7" + warning "2.x" + +rc-util@^4.0.4, rc-util@^4.1.0, rc-util@^4.1.1, rc-util@^4.3.0, rc-util@^4.4.0, rc-util@^4.5.0, rc-util@^4.5.1: + version "4.5.1" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.5.1.tgz#0e435057174c024901c7600ba8903dd03da3ab39" + dependencies: + add-dom-event-listener "1.x" + babel-runtime "6.x" + prop-types "^15.5.10" + shallowequal "^0.2.2" + +rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dev-utils@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-5.0.1.tgz#1f396e161fe44b595db1b186a40067289bf06613" + dependencies: + address "1.0.3" + babel-code-frame "6.26.0" + chalk "1.1.3" + cross-spawn "5.1.0" + detect-port-alt "1.1.6" + escape-string-regexp "1.0.5" + filesize "3.5.11" + global-modules "1.0.0" + gzip-size "3.0.0" + inquirer "3.3.0" + is-root "1.0.0" + opn "5.2.0" + react-error-overlay "^4.0.0" + recursive-readdir "2.2.1" + shell-quote "1.6.1" + sockjs-client "1.1.4" + strip-ansi "3.0.1" + text-table "0.2.0" + +react-dom-factories@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/react-dom-factories/-/react-dom-factories-1.0.2.tgz#eb7705c4db36fb501b3aa38ff759616aa0ff96e0" + +react-dom@^16.4.1: + version "16.4.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz#7f8b0223b3a5fbe205116c56deb85de32685dad6" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + +react-error-overlay@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4" + +react-lazy-load@^3.0.12: + version "3.0.13" + resolved "https://registry.yarnpkg.com/react-lazy-load/-/react-lazy-load-3.0.13.tgz#3b0a92d336d43d3f0d73cbe6f35b17050b08b824" + dependencies: + eventlistener "0.0.1" + lodash.debounce "^4.0.0" + lodash.throttle "^4.0.0" + prop-types "^15.5.8" + +react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + +react-quill@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/react-quill/-/react-quill-1.3.1.tgz#9fd2003f20a0f3bb6c9e55631add7658f5f967a4" + dependencies: + "@types/quill" "*" + "@types/react" "*" + create-react-class "^15.6.0" + lodash "^4.17.4" + prop-types "^15.5.10" + quill "^1.2.6" + react-dom-factories "^1.0.0" + +react-router-dom@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.3.1.tgz#4c2619fc24c4fa87c9fd18f4fb4a43fe63fbd5c6" + dependencies: + history "^4.7.2" + invariant "^2.2.4" + loose-envify "^1.3.1" + prop-types "^15.6.1" + react-router "^4.3.1" + warning "^4.0.1" + +react-router@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e" + dependencies: + history "^4.7.2" + hoist-non-react-statics "^2.5.0" + invariant "^2.2.4" + loose-envify "^1.3.1" + path-to-regexp "^1.7.0" + prop-types "^15.6.1" + warning "^4.0.1" + +react-scripts@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-1.1.4.tgz#d5c230e707918d6dd2d06f303b10f5222d017c88" + dependencies: + autoprefixer "7.1.6" + babel-core "6.26.0" + babel-eslint "7.2.3" + babel-jest "20.0.3" + babel-loader "7.1.2" + babel-preset-react-app "^3.1.1" + babel-runtime "6.26.0" + case-sensitive-paths-webpack-plugin "2.1.1" + chalk "1.1.3" + css-loader "0.28.7" + dotenv "4.0.0" + dotenv-expand "4.2.0" + eslint "4.10.0" + eslint-config-react-app "^2.1.0" + eslint-loader "1.9.0" + eslint-plugin-flowtype "2.39.1" + eslint-plugin-import "2.8.0" + eslint-plugin-jsx-a11y "5.1.1" + eslint-plugin-react "7.4.0" + extract-text-webpack-plugin "3.0.2" + file-loader "1.1.5" + fs-extra "3.0.1" + html-webpack-plugin "2.29.0" + jest "20.0.4" + object-assign "4.1.1" + postcss-flexbugs-fixes "3.2.0" + postcss-loader "2.0.8" + promise "8.0.1" + raf "3.4.0" + react-dev-utils "^5.0.1" + resolve "1.6.0" + style-loader "0.19.0" + sw-precache-webpack-plugin "0.11.4" + url-loader "0.6.2" + webpack "3.8.1" + webpack-dev-server "2.9.4" + webpack-manifest-plugin "1.3.2" + whatwg-fetch "2.0.3" + optionalDependencies: + fsevents "^1.1.3" + +react-slick@~0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/react-slick/-/react-slick-0.23.1.tgz#15791c4107f0ba3a5688d5bd97b7b7ceaa0dd181" + dependencies: + classnames "^2.2.5" + enquire.js "^2.1.6" + json2mq "^0.2.0" + lodash.debounce "^4.0.8" + resize-observer-polyfill "^1.5.0" + +react@^16.4.1: + version "16.4.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@1.0: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +recursive-readdir@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" + dependencies: + minimatch "3.0.3" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +regenerate@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +registry-auth-token@^3.0.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + dependencies: + rc "^1.1.6" + safe-buffer "^5.0.1" + +registry-url@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + dependencies: + rc "^1.0.1" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +renderkid@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" + dependencies: + css-select "^1.1.0" + dom-converter "~0.1" + htmlparser2 "~3.3.0" + strip-ansi "^3.0.0" + utila "~0.3" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + +resize-observer-polyfill@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz#660ff1d9712a2382baa2cad450a4716209f9ca69" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + +resolve-dir@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + +resolve-pathname@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" + dependencies: + path-parse "^1.0.5" + +resolve@^1.3.2, resolve@^1.5.0: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.2.8, rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rmc-feedback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/rmc-feedback/-/rmc-feedback-2.0.0.tgz#cbc6cb3ae63c7a635eef0e25e4fbaf5ac366eeaa" + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1, sax@^1.2.4, sax@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +schema-utils@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" + dependencies: + ajv "^5.0.0" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + +selfsigned@^1.9.1: + version "1.10.3" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.3.tgz#d628ecf9e3735f84e8bafba936b3cf85bea43823" + dependencies: + node-forge "0.7.5" + +semver-diff@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" + dependencies: + semver "^5.0.3" + +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serve-index@^1.7.2: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +serviceworker-cache-polyfill@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz#de19ee73bef21ab3c0740a37b33db62464babdeb" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.0.0.tgz#508d1838b3de590ab8757b011b25e430900945f7" + +shallowequal@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e" + dependencies: + lodash.keys "^3.1.2" + +shallowequal@^1.0.1, shallowequal@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shell-quote@1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sockjs-client@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.4.tgz#5babe386b775e4cf14e7520911452654016c8b12" + dependencies: + debug "^2.6.6" + eventsource "0.1.6" + faye-websocket "~0.11.0" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.1.8" + +sockjs@0.3.18: + version "0.3.18" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.18.tgz#d9b289316ca7df77595ef299e075f0f937eb4207" + dependencies: + faye-websocket "^0.10.0" + uuid "^2.0.2" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-list-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + +spdy-transport@^2.0.18: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" + dependencies: + debug "^2.6.8" + detect-node "^2.0.3" + hpack.js "^2.1.6" + obuf "^1.1.1" + readable-stream "^2.2.9" + safe-buffer "^5.0.1" + wbuf "^1.7.2" + +spdy@^3.4.1: + version "3.4.7" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" + dependencies: + debug "^2.6.8" + handle-thing "^1.2.5" + http-deceiver "^1.2.7" + safe-buffer "^5.0.1" + select-hose "^2.0.0" + spdy-transport "^2.0.18" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + safer-buffer "^2.0.2" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +stream-browserify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-convert@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.0.0, string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +style-loader@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.0.tgz#7258e788f0fee6a42d710eaf7d6c2412a4c50759" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.3.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2, supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + +supports-color@^5.3.0, supports-color@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +sw-precache-webpack-plugin@0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.11.4.tgz#a695017e54eed575551493a519dc1da8da2dc5e0" + dependencies: + del "^2.2.2" + sw-precache "^5.1.1" + uglify-js "^3.0.13" + +sw-precache@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.1.tgz#06134f319eec68f3b9583ce9a7036b1c119f7179" + dependencies: + dom-urls "^1.1.0" + es6-promise "^4.0.5" + glob "^7.1.1" + lodash.defaults "^4.2.0" + lodash.template "^4.4.0" + meow "^3.7.0" + mkdirp "^0.5.1" + pretty-bytes "^4.0.2" + sw-toolbox "^3.4.0" + update-notifier "^2.3.0" + +sw-toolbox@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/sw-toolbox/-/sw-toolbox-3.6.0.tgz#26df1d1c70348658e4dea2884319149b7b3183b5" + dependencies: + path-to-regexp "^1.0.1" + serviceworker-cache-polyfill "^4.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +table@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" + dependencies: + ajv "^6.0.1" + ajv-keywords "^3.0.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + +tapable@^0.2.7: + version "0.2.8" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + +tar@^4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + dependencies: + execa "^0.7.0" + +test-exclude@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" + dependencies: + arrify "^1.0.1" + micromatch "^3.1.8" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-table@0.2.0, text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +thunky@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" + +time-stamp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" + +timed-out@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + +timers-browserify@^2.0.4: + version "2.0.10" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" + dependencies: + setimmediate "^1.0.4" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + +tough-cookie@^2.3.2: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.15, type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +ua-parser-js@^0.7.18: + version "0.7.18" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" + +uglify-js@3.4.x, uglify-js@^3.0.13: + version "3.4.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.4.tgz#92e79532a3aeffd4b6c65755bdba8d5bad98d607" + dependencies: + commander "~2.16.0" + source-map "~0.6.1" + +uglify-js@^2.6, uglify-js@^2.8.29: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uglifyjs-webpack-plugin@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + dependencies: + source-map "^0.5.6" + uglify-js "^2.8.29" + webpack-sources "^1.0.1" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + dependencies: + crypto-random-string "^1.0.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +unzip-response@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +update-notifier@^2.3.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" + dependencies: + boxen "^1.2.1" + chalk "^2.0.1" + configstore "^3.0.0" + import-lazy "^2.1.0" + is-ci "^1.0.10" + is-installed-globally "^0.1.0" + is-npm "^1.0.0" + latest-version "^3.0.0" + semver-diff "^2.0.0" + xdg-basedir "^3.0.0" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +uri-js@^4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + dependencies: + punycode "^2.1.0" + +urijs@^1.16.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.1.tgz#5b0ff530c0cbde8386f6342235ba5ca6e995d25a" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-loader@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" + dependencies: + loader-utils "^1.0.2" + mime "^1.4.1" + schema-utils "^0.3.0" + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + dependencies: + prepend-http "^1.0.1" + +url-parse@^1.1.8, url-parse@~1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.1.tgz#4dec9dad3dc8585f862fed461d2e19bbf623df30" + dependencies: + querystringify "^2.0.0" + requires-port "^1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" + dependencies: + kind-of "^6.0.2" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +util@^0.10.3: + version "0.10.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" + dependencies: + inherits "2.0.3" + +utila@~0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" + +utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +uuid@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.1.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + +validate-npm-package-license@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +value-equal@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +vendors@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +warning@2.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/warning/-/warning-2.1.0.tgz#21220d9c63afc77a8c92111e011af705ce0c6901" + dependencies: + loose-envify "^1.0.0" + +warning@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" + dependencies: + loose-envify "^1.0.0" + +warning@^4.0.1, warning@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.1.tgz#66ce376b7fbfe8a887c22bdf0e7349d73d397745" + dependencies: + loose-envify "^1.0.0" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +watchpack@^1.4.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +wbuf@^1.1.0, wbuf@^1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + dependencies: + minimalistic-assert "^1.0.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + +webpack-dev-middleware@^1.11.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" + dependencies: + memory-fs "~0.4.1" + mime "^1.5.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + time-stamp "^2.0.0" + +webpack-dev-server@2.9.4: + version "2.9.4" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz#7883e61759c6a4b33e9b19ec4037bd4ab61428d1" + dependencies: + ansi-html "0.0.7" + array-includes "^3.0.3" + bonjour "^3.5.0" + chokidar "^1.6.0" + compression "^1.5.2" + connect-history-api-fallback "^1.3.0" + debug "^3.1.0" + del "^3.0.0" + express "^4.13.3" + html-entities "^1.2.0" + http-proxy-middleware "~0.17.4" + import-local "^0.1.1" + internal-ip "1.2.0" + ip "^1.1.5" + killable "^1.0.0" + loglevel "^1.4.1" + opn "^5.1.0" + portfinder "^1.0.9" + selfsigned "^1.9.1" + serve-index "^1.7.2" + sockjs "0.3.18" + sockjs-client "1.1.4" + spdy "^3.4.1" + strip-ansi "^3.0.1" + supports-color "^4.2.1" + webpack-dev-middleware "^1.11.0" + yargs "^6.6.0" + +webpack-manifest-plugin@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-1.3.2.tgz#5ea8ee5756359ddc1d98814324fe43496349a7d4" + dependencies: + fs-extra "^0.30.0" + lodash ">=3.5 <5" + +webpack-sources@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +websocket-driver@>=0.5.1: + version "0.7.0" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb" + dependencies: + http-parser-js ">=0.4.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + +whatwg-encoding@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" + dependencies: + iconv-lite "0.4.19" + +whatwg-fetch@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + +whatwg-fetch@>=0.10.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + dependencies: + string-width "^1.0.2 || 2" + +widest-line@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" + dependencies: + string-width "^2.1.1" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" + dependencies: + errno "~0.1.7" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..f907840 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "create-react-app": "^1.5.2", + "react": "^16.4.1" + } +} diff --git a/generate-subs.py b/generate-subs.py new file mode 100644 index 0000000..48b90ce --- /dev/null +++ b/generate-subs.py @@ -0,0 +1,15 @@ +import csv +import random + +f = open("/tmp/subs.csv", "w+") +w = csv.writer(f) +w.writerow(["email", "name", "status", "tags", "attributes"]) + +for n in range(0, 100000): + w.writerow([ + "user%d@mail.com" % (n,), + "First%d Last%d" % (n, n), + "enabled", + "apple|mango|orange", + "{\"age\": %d, \"city\": \"Bangalore\"}" % (random.randint(20,70),) + ]) diff --git a/handlers.go b/handlers.go new file mode 100644 index 0000000..c335033 --- /dev/null +++ b/handlers.go @@ -0,0 +1,137 @@ +package main + +import ( + "encoding/json" + "net/url" + "path/filepath" + "strconv" + "strings" + + "github.com/asaskevich/govalidator" + + "github.com/gorilla/sessions" + "github.com/labstack/echo" + "github.com/labstack/echo-contrib/session" +) + +const ( + // stdInputMaxLen is the maximum allowed length for a standard input field. + stdInputMaxLen = 200 + + // bodyMaxLen is the maximum allowed length for e-mail bodies. + bodyMaxLen = 1000000 + + // defaultPerPage is the default number of results returned in an GET call. + defaultPerPage = 20 + + // maxPerPage is the maximum number of allowed for paginated records. + maxPerPage = 100 +) + +type okResp struct { + Data interface{} `json:"data"` +} + +// pagination represents a query's pagination (limit, offset) related values. +type pagination struct { + PerPage int `json:"per_page"` + Page int `json:"page"` + Offset int `json:"offset"` + Limit int `json:"limit"` +} + +// auth is a middleware that handles session authentication. If a session is not set, +// it creates one and redirects the user to the login page. If a session is set, +// it's authenticated before proceeding to the handler. +func authSession(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + sess, _ := session.Get("session", c) + + // It's a brand new session. Persist it. + if sess.IsNew { + sess.Options = &sessions.Options{ + Path: "/", + MaxAge: 86400 * 7, + HttpOnly: true, + // Secure: true, + } + + sess.Values["user_id"] = 1 + sess.Values["user"] = "kailash" + sess.Values["role"] = "superadmin" + sess.Values["user_email"] = "kailash@zerodha.com" + + sess.Save(c.Request(), c.Response()) + } + + return next(c) + } +} + +// handleIndex is the root handler that renders the login page if there's no +// authenticated session, or redirects to the dashboard, if there's one. +func handleIndexPage(c echo.Context) error { + app := c.Get("app").(*App) + return c.File(filepath.Join(app.Constants.AssetPath, "index.html")) +} + +// makeAttribsBlob takes a list of keys and values and creates +// a JSON map out of them. +func makeAttribsBlob(keys []string, vals []string) ([]byte, bool) { + attribs := make(map[string]interface{}) + for i, key := range keys { + var ( + s = vals[i] + val interface{} + ) + + // Try to detect common JSON types. + if govalidator.IsFloat(s) { + val, _ = strconv.ParseFloat(s, 64) + } else if govalidator.IsInt(s) { + val, _ = strconv.ParseInt(s, 10, 64) + } else { + ls := strings.ToLower(s) + if ls == "true" || ls == "false" { + val, _ = strconv.ParseBool(ls) + } else { + // It's a string. + val = s + } + } + + attribs[key] = val + } + + if len(attribs) > 0 { + j, _ := json.Marshal(attribs) + return j, true + } + + return nil, false +} + +// getPagination takes form values and extracts pagination values from it. +func getPagination(q url.Values) pagination { + var ( + perPage, _ = strconv.Atoi(q.Get("per_page")) + page, _ = strconv.Atoi(q.Get("page")) + ) + + if perPage < 1 || perPage > maxPerPage { + perPage = defaultPerPage + } + + if page < 1 { + page = 0 + } else { + page-- + } + + return pagination{ + Page: page + 1, + PerPage: perPage, + Offset: page * perPage, + Limit: perPage, + } +} diff --git a/import.go b/import.go new file mode 100644 index 0000000..89877be --- /dev/null +++ b/import.go @@ -0,0 +1,113 @@ +package main + +import ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + + "github.com/knadh/listmonk/subimporter" + "github.com/labstack/echo" +) + +// reqImport represents file upload import params. +type reqImport struct { + Delim string `json:"delim"` + OverrideStatus bool `json:"override_status"` + ListIDs []int `json:"lists"` +} + +// handleImportSubscribers handles the uploading and bulk importing of +// a ZIP file of one or more CSV files. +func handleImportSubscribers(c echo.Context) error { + app := c.Get("app").(*App) + + // Is an import already running? + if app.Importer.GetStats().Status == subimporter.StatusImporting { + return echo.NewHTTPError(http.StatusBadRequest, + "An import is already running. Wait for it to finish or stop it before trying again.") + } + + // Unmarsal the JSON params. + var r reqImport + if err := json.Unmarshal([]byte(c.FormValue("params")), &r); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Invalid `params` field: %v", err)) + } + + if len(r.Delim) != 1 { + return echo.NewHTTPError(http.StatusBadRequest, + "`delim` should be a single character") + } + + file, err := c.FormFile("file") + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Invalid `file`: %v", err)) + } + + src, err := file.Open() + if err != nil { + return err + } + defer src.Close() + + out, err := ioutil.TempFile("", "listmonk") + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error copying uploaded file: %v", err)) + } + defer out.Close() + + if _, err = io.Copy(out, src); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error copying uploaded file: %v", err)) + } + + // Start the importer session. + impSess, err := app.Importer.NewSession(file.Filename, + r.OverrideStatus, + r.ListIDs) + if err != nil { + return err + } + go impSess.Start() + + // For now, we only extract 1 CSV from the ZIP. Handling async CSV + // imports is more trouble than it's worth. + dir, files, err := impSess.ExtractZIP(out.Name(), 1) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error extracting ZIP file: %v", err)) + } + go impSess.LoadCSV(dir+"/"+files[0], rune(r.Delim[0])) + + return c.JSON(http.StatusOK, okResp{app.Importer.GetStats()}) +} + +// handleGetImportSubscribers returns import statistics. +func handleGetImportSubscribers(c echo.Context) error { + var ( + app = c.Get("app").(*App) + s = app.Importer.GetStats() + ) + + return c.JSON(http.StatusOK, okResp{s}) +} + +// handleGetImportSubscriberLogs returns import statistics. +func handleGetImportSubscriberLogs(c echo.Context) error { + app := c.Get("app").(*App) + return c.JSON(http.StatusOK, okResp{string(app.Importer.GetLogs())}) +} + +// handleStopImportSubscribers sends a stop signal to the importer. +// If there's an ongoing import, it'll be stopped, and if an import +// is finished, it's state is cleared. +func handleStopImportSubscribers(c echo.Context) error { + app := c.Get("app").(*App) + app.Importer.Stop() + + return c.JSON(http.StatusOK, okResp{app.Importer.GetStats()}) +} diff --git a/install.go b/install.go new file mode 100644 index 0000000..989a004 --- /dev/null +++ b/install.go @@ -0,0 +1,169 @@ +package main + +import ( + "bytes" + "fmt" + "io/ioutil" + "regexp" + "syscall" + + "github.com/lib/pq" + uuid "github.com/satori/go.uuid" + + "github.com/jmoiron/sqlx" + "github.com/knadh/goyesql" + "github.com/knadh/listmonk/models" + "github.com/spf13/viper" + "golang.org/x/crypto/bcrypt" + "golang.org/x/crypto/ssh/terminal" +) + +// install runs the first time setup of creating and +// migrating the database and creating the super user. +func install(app *App, qMap goyesql.Queries) { + var ( + email, pw, pw2 []byte + err error + + // Pseudo e-mail validation using Regexp, well ... + emRegex, _ = regexp.Compile("(.+?)@(.+?)") + ) + + fmt.Println("** First time installation. **") + fmt.Println("** IMPORTANT: This will wipe existing listmonk tables and types. **") + fmt.Println("\n") + + for len(email) == 0 { + fmt.Print("Enter the superadmin login e-mail: ") + if _, err = fmt.Scanf("%s", &email); err != nil { + logger.Fatalf("Error reading e-mail from the terminal: %v", err) + } + + if !emRegex.Match(email) { + logger.Println("Please enter a valid e-mail") + email = []byte{} + } + } + + for len(pw) < 8 { + fmt.Print("Enter the superadmin password (min 8 chars): ") + if pw, err = terminal.ReadPassword(int(syscall.Stdin)); err != nil { + logger.Fatalf("Error reading password from the terminal: %v", err) + } + + fmt.Println("") + if len(pw) < 8 { + logger.Println("Password should be min 8 characters") + pw = []byte{} + } + } + + for len(pw2) < 8 { + fmt.Print("Repeat the superadmin password: ") + if pw2, err = terminal.ReadPassword(int(syscall.Stdin)); err != nil { + logger.Fatalf("Error reading password from the terminal: %v", err) + } + + fmt.Println("") + if len(pw2) < 8 { + logger.Println("Password should be min 8 characters") + pw2 = []byte{} + } + } + + // Validate. + if !bytes.Equal(pw, pw2) { + logger.Fatalf("Passwords don't match") + } + + // Hash the password. + hash, err := bcrypt.GenerateFromPassword(pw, bcrypt.DefaultCost) + if err != nil { + logger.Fatalf("Error hashing password: %v", err) + } + + // Migrate the tables. + err = installMigrate(app.DB) + if err != nil { + logger.Fatalf("Error migrating DB schema: %v", err) + } + + // Load the queries. + var q Queries + if err := scanQueriesToStruct(&q, qMap, app.DB.Unsafe()); err != nil { + logger.Fatalf("error loading SQL queries: %v", err) + } + + // Create the superadmin user. + if _, err := q.CreateUser.Exec( + string(email), + models.UserTypeSuperadmin, // name + string(hash), + models.UserTypeSuperadmin, + models.UserStatusEnabled, + ); err != nil { + logger.Fatalf("Error creating superadmin user: %v", err) + } + + // Sample list. + var listID int + if err := q.CreateList.Get(&listID, + uuid.NewV4().String(), + "Default list", + models.ListTypePublic, + pq.StringArray{"test"}, + ); err != nil { + logger.Fatalf("Error creating superadmin user: %v", err) + } + + // Sample subscriber. + name := bytes.Split(email, []byte("@")) + if _, err := q.UpsertSubscriber.Exec( + uuid.NewV4(), + email, + bytes.Title(name[0]), + models.SubscriberStatusEnabled, + `{"type": "known", "good": true}`, + true, + pq.Int64Array{int64(listID)}, + ); err != nil { + logger.Fatalf("Error creating subscriber: %v", err) + } + + // Default template. + tplBody, err := ioutil.ReadFile("default-template.html") + if err != nil { + tplBody = []byte(`{{ template "content" . }}`) + } + + var tplID int + if err := q.CreateTemplate.Get(&tplID, + "Default template", + string(tplBody), + ); err != nil { + logger.Fatalf("Error creating default template: %v", err) + } + if _, err := q.SetDefaultTemplate.Exec(tplID); err != nil { + logger.Fatalf("Error setting default template: %v", err) + } + + logger.Printf("Setup complete") + logger.Printf(`Run the program and login with the username "superadmin" and your password at %s`, + viper.GetString("server.address")) + +} + +// installMigrate executes the SQL schema and creates the necessary tables and types. +func installMigrate(db *sqlx.DB) error { + q, err := ioutil.ReadFile("schema.sql") + if err != nil { + return err + } + + _, err = db.Query(string(q)) + if err != nil { + return err + } + + return nil +} diff --git a/lists.go b/lists.go new file mode 100644 index 0000000..a52ebd0 --- /dev/null +++ b/lists.go @@ -0,0 +1,146 @@ +package main + +import ( + "fmt" + "net/http" + "strconv" + + "github.com/knadh/listmonk/models" + "github.com/lib/pq" + uuid "github.com/satori/go.uuid" + + "github.com/asaskevich/govalidator" + "github.com/labstack/echo" +) + +// handleGetLists handles retrieval of lists. +func handleGetLists(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out []models.List + + listID, _ = strconv.Atoi(c.Param("id")) + single = false + ) + + // Fetch one list. + if listID > 0 { + single = true + } + + err := app.Queries.GetLists.Select(&out, listID) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching lists: %s", pqErrMsg(err))) + } else if single && len(out) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "List not found.") + } else if len(out) == 0 { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + // Replace null tags. + for i, v := range out { + if v.Tags == nil { + out[i].Tags = make(pq.StringArray, 0) + } + } + + if single { + return c.JSON(http.StatusOK, okResp{out[0]}) + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handleCreateList handles list creation. +func handleCreateList(c echo.Context) error { + var ( + app = c.Get("app").(*App) + o = models.List{} + ) + + if err := c.Bind(&o); err != nil { + return err + } + + // Validate. + if !govalidator.IsByteLength(o.Name, 1, stdInputMaxLen) { + return echo.NewHTTPError(http.StatusBadRequest, + "Invalid length for the name field.") + } + + // Insert and read ID. + var newID int + o.UUID = uuid.NewV4().String() + if err := app.Queries.CreateList.Get(&newID, + o.UUID, + o.Name, + o.Type, + pq.StringArray(normalizeTags(o.Tags))); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error creating list: %s", pqErrMsg(err))) + } + + // Hand over to the GET handler to return the last insertion. + c.SetParamNames("id") + c.SetParamValues(fmt.Sprintf("%d", newID)) + return c.JSON(http.StatusOK, handleGetLists(c)) +} + +// handleUpdateList handles list modification. +func handleUpdateList(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + // Incoming params. + var o models.List + if err := c.Bind(&o); err != nil { + return err + } + + res, err := app.Queries.UpdateList.Exec(id, o.Name, o.Type, pq.StringArray(normalizeTags(o.Tags))) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Error updating list: %s", pqErrMsg(err))) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "List not found.") + } + + return handleGetLists(c) +} + +// handleDeleteLists handles deletion deletion, +// either a single one (ID in the URI), or a list. +func handleDeleteLists(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.ParseInt(c.Param("id"), 10, 64) + ids pq.Int64Array + ) + + // Read the list IDs if they were sent in the body. + c.Bind(&ids) + + if id < 1 && len(ids) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + if id > 0 { + ids = append(ids, id) + } + + if _, err := app.Queries.DeleteLists.Exec(ids); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Delete failed: %v", err)) + } + + return c.JSON(http.StatusOK, okResp{true}) +} diff --git a/main.go b/main.go new file mode 100644 index 0000000..e869ec4 --- /dev/null +++ b/main.go @@ -0,0 +1,258 @@ +package main + +import ( + "fmt" + "html/template" + "log" + "os" + "path/filepath" + "time" + + _ "github.com/jinzhu/gorm/dialects/postgres" + "github.com/jmoiron/sqlx" + "github.com/knadh/goyesql" + "github.com/knadh/listmonk/messenger" + "github.com/knadh/listmonk/runner" + "github.com/knadh/listmonk/subimporter" + "github.com/labstack/echo" + flag "github.com/spf13/pflag" + "github.com/spf13/viper" +) + +var logger *log.Logger + +type constants struct { + AssetPath string `mapstructure:"asset_path"` + RootURL string `mapstructure:"root"` + UploadPath string `mapstructure:"upload_path"` + UploadURI string `mapstructure:"upload_uri"` +} + +// App contains the "global" components that are +// passed around, especially through HTTP handlers. +type App struct { + Constants *constants + DB *sqlx.DB + Queries *Queries + Importer *subimporter.Importer + Runner *runner.Runner + Logger *log.Logger +} + +func init() { + logger = log.New(os.Stdout, "SYS: ", log.Ldate|log.Ltime|log.Lshortfile) + + // Register --help handler. + flagSet := flag.NewFlagSet("config", flag.ContinueOnError) + flagSet.Usage = func() { + fmt.Println(flagSet.FlagUsages()) + os.Exit(0) + } + + // Setup the default configuration. + viper.SetConfigName("config") + flagSet.StringSlice("config", []string{"config.toml"}, + "Path to one or more config files (will be merged in order)") + flagSet.Bool("install", false, "Run first time installation") + flagSet.Bool("version", false, "Current version of the build") + + // Process flags. + flagSet.Parse(os.Args[1:]) + viper.BindPFlags(flagSet) + + // Read the config files. + cfgs := viper.GetStringSlice("config") + for _, c := range cfgs { + logger.Printf("reading config: %s", c) + viper.SetConfigFile(c) + + if err := viper.MergeInConfig(); err != nil { + logger.Fatalf("error reading config: %s", err) + } + } +} + +// registerHandlers registers HTTP handlers. +func registerHandlers(e *echo.Echo) { + e.GET("/", handleIndexPage) + e.GET("/api/users", handleGetUsers) + e.POST("/api/users", handleCreateUser) + e.DELETE("/api/users/:id", handleDeleteUser) + + e.GET("/api/subscribers/:id", handleGetSubscriber) + e.GET("/api/subscribers", handleQuerySubscribers) + e.POST("/api/subscribers", handleCreateSubscriber) + e.PUT("/api/subscribers/:id", handleUpdateSubscriber) + e.DELETE("/api/subscribers/:id", handleDeleteSubscribers) + e.DELETE("/api/subscribers", handleDeleteSubscribers) + e.POST("/api/subscribers/lists", handleQuerySubscribersIntoLists) + + e.GET("/api/import/subscribers", handleGetImportSubscribers) + e.GET("/api/import/subscribers/logs", handleGetImportSubscriberLogs) + e.POST("/api/import/subscribers", handleImportSubscribers) + e.DELETE("/api/import/subscribers", handleStopImportSubscribers) + + e.GET("/api/lists", handleGetLists) + e.GET("/api/lists/:id", handleGetLists) + e.POST("/api/lists", handleCreateList) + e.PUT("/api/lists/:id", handleUpdateList) + e.DELETE("/api/lists/:id", handleDeleteLists) + + e.GET("/api/campaigns", handleGetCampaigns) + e.GET("/api/campaigns/running/stats", handleGetRunningCampaignStats) + e.GET("/api/campaigns/messengers", handleGetCampaignMessengers) + e.GET("/api/campaigns/:id", handleGetCampaigns) + e.GET("/api/campaigns/:id/preview", handlePreviewCampaign) + e.POST("/api/campaigns", handleCreateCampaign) + e.PUT("/api/campaigns/:id", handleUpdateCampaign) + e.PUT("/api/campaigns/:id/status", handleUpdateCampaignStatus) + e.DELETE("/api/campaigns/:id", handleDeleteCampaign) + + e.GET("/api/media", handleGetMedia) + e.POST("/api/media", handleUploadMedia) + e.DELETE("/api/media/:id", handleDeleteMedia) + + e.GET("/api/templates", handleGetTemplates) + e.GET("/api/templates/:id", handleGetTemplates) + e.GET("/api/templates/:id/preview", handlePreviewTemplate) + e.POST("/api/templates", handleCreateTemplate) + e.PUT("/api/templates/:id", handleUpdateTemplate) + e.PUT("/api/templates/:id/default", handleTemplateSetDefault) + e.DELETE("/api/templates/:id", handleDeleteTemplate) + + // Subscriber facing views. + e.GET("/unsubscribe/:campUUID/:subUUID", handleUnsubscribePage) + e.POST("/unsubscribe/:campUUID/:subUUID", handleUnsubscribePage) + + // Static views. + e.GET("/lists", handleIndexPage) + e.GET("/subscribers", handleIndexPage) + e.GET("/subscribers/lists/:listID", handleIndexPage) + e.GET("/subscribers/import", handleIndexPage) + e.GET("/campaigns", handleIndexPage) + e.GET("/campaigns/new", handleIndexPage) + e.GET("/campaigns/media", handleIndexPage) + e.GET("/campaigns/templates", handleIndexPage) + e.GET("/campaigns/:campignID", handleIndexPage) +} + +// initMessengers initializes various messaging backends. +func initMessengers(r *runner.Runner) { + // Load SMTP configurations for the default e-mail Messenger. + var srv []messenger.Server + for name := range viper.GetStringMapString("smtp") { + if !viper.GetBool(fmt.Sprintf("smtp.%s.enabled", name)) { + logger.Printf("skipped SMTP config %s", name) + continue + } + + var s messenger.Server + viper.UnmarshalKey("smtp."+name, &s) + + s.Name = name + s.SendTimeout = s.SendTimeout * time.Millisecond + srv = append(srv, s) + + logger.Printf("loaded SMTP config %s (%s@%s)", s.Name, s.Username, s.Host) + } + + e, err := messenger.NewEmailer(srv...) + if err != nil { + logger.Fatalf("error loading e-mail messenger: %v", err) + } + + if err := r.AddMessenger(e); err != nil { + logger.Printf("error registering messenger %s", err) + } +} + +func main() { + // Connect to the DB. + db, err := connectDB(viper.GetString("db.host"), + viper.GetInt("db.port"), + viper.GetString("db.user"), + viper.GetString("db.password"), + viper.GetString("db.database")) + if err != nil { + logger.Fatalf("error connecting to DB: %v", err) + } + defer db.Close() + + var c constants + viper.UnmarshalKey("app", &c) + c.AssetPath = filepath.Clean(viper.GetString("app.asset_path")) + + // Initialize the app context that's passed around. + app := &App{ + Constants: &c, + DB: db, + Logger: logger, + } + + // Load SQL queries. + qMap, err := goyesql.ParseFile("queries.sql") + if err != nil { + logger.Fatalf("error loading SQL queries: %v", err) + } + + // First time installation. + if viper.GetBool("install") { + install(app, qMap) + return + } + + // Map queries to the query container. + q := &Queries{} + if err := scanQueriesToStruct(q, qMap, db.Unsafe()); err != nil { + logger.Fatalf("no SQL queries loaded: %v", err) + } + + app.Queries = q + app.Importer = subimporter.New(q.UpsertSubscriber.Stmt, db.DB) + + // Campaign daemon. + r := runner.New(runner.Config{ + Concurrency: viper.GetInt("app.concurrency"), + + // url.com/unsubscribe/{campaign_uuid}/{subscriber_uuid} + UnsubscribeURL: fmt.Sprintf("%s/unsubscribe/%%s/%%s", app.Constants.RootURL), + }, newRunnerDB(q), logger) + app.Runner = r + + // Add messengers. + initMessengers(app.Runner) + + go r.Run(time.Duration(time.Second * 2)) + r.SpawnWorkers() + + // Initialize the server. + var srv = echo.New() + srv.Use(func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + c.Set("app", app) + return next(c) + } + }) + + // User facing templates. + tpl, err := template.ParseGlob("public/templates/*.html") + if err != nil { + logger.Fatalf("error parsing public templates: %v", err) + } + srv.Renderer = &Template{ + templates: tpl, + } + srv.HideBanner = true + + // Register HTTP middleware. + // e.Use(session.Middleware(sessions.NewCookieStore([]byte("secret")))) + // e.Use(authSession) + srv.Static("/static", filepath.Join(filepath.Clean(viper.GetString("app.asset_path")), "static")) + srv.Static("/static/public", "frontend/my/public") + srv.Static("/public/static", "public/static") + srv.Static(filepath.Clean(viper.GetString("app.upload_uri")), + filepath.Clean(viper.GetString("app.upload_path"))) + registerHandlers(srv) + + srv.Logger.Fatal(srv.Start(viper.GetString("app.address"))) +} diff --git a/media.go b/media.go new file mode 100644 index 0000000..414d429 --- /dev/null +++ b/media.go @@ -0,0 +1,112 @@ +package main + +import ( + "fmt" + "net/http" + "os" + "path/filepath" + "strconv" + + "github.com/disintegration/imaging" + "github.com/knadh/listmonk/models" + "github.com/labstack/echo" + uuid "github.com/satori/go.uuid" +) + +var imageMimes = []string{"image/jpg", "image/jpeg", "image/png", "image/svg", "image/gif"} + +const ( + thumbPrefix = "thumb_" + thumbWidth = 90 + thumbHeight = 90 +) + +// handleUploadMedia handles media file uploads. +func handleUploadMedia(c echo.Context) error { + var ( + app = c.Get("app").(*App) + cleanUp = false + ) + + // Upload the file. + fName, err := uploadFile("file", app.Constants.UploadPath, "", imageMimes, c) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error uploading file: %s", err)) + } + path := filepath.Join(app.Constants.UploadPath, fName) + + defer func() { + // If any of the subroutines in this function fail, + // the uploaded image should be removed. + if cleanUp { + os.Remove(path) + } + }() + + // Create a thumbnail. + src, err := imaging.Open(path) + if err != nil { + cleanUp = true + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error opening image for resizing: %s", err)) + } + + t := imaging.Resize(src, thumbWidth, 0, imaging.Lanczos) + if err := imaging.Save(t, fmt.Sprintf("%s/%s%s", app.Constants.UploadPath, thumbPrefix, fName)); err != nil { + cleanUp = true + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error saving thumbnail: %s", err)) + } + + // Write to the DB. + if _, err := app.Queries.InsertMedia.Exec(uuid.NewV4(), fName, fmt.Sprintf("%s%s", thumbPrefix, fName), 0, 0); err != nil { + cleanUp = true + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error saving uploaded file: %s", pqErrMsg(err))) + } + + return c.JSON(http.StatusOK, okResp{true}) +} + +// handleGetMedia handles retrieval of uploaded media. +func handleGetMedia(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out []models.Media + ) + + if err := app.Queries.GetMedia.Select(&out); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching media list: %s", pqErrMsg(err))) + } + + for i := 0; i < len(out); i++ { + out[i].URI = fmt.Sprintf("%s/%s", app.Constants.UploadURI, out[i].Filename) + out[i].ThumbURI = fmt.Sprintf("%s/%s%s", app.Constants.UploadURI, thumbPrefix, out[i].Filename) + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// deleteMedia handles deletion of uploaded media. +func handleDeleteMedia(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + var m models.Media + if err := app.Queries.DeleteMedia.Get(&m, id); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error deleting media: %s", pqErrMsg(err))) + } + os.Remove(filepath.Join(app.Constants.UploadPath, m.Filename)) + os.Remove(filepath.Join(app.Constants.UploadPath, fmt.Sprintf("%s%s", thumbPrefix, m.Filename))) + + return c.JSON(http.StatusOK, okResp{true}) +} diff --git a/messenger/emailer.go b/messenger/emailer.go new file mode 100644 index 0000000..98bcbca --- /dev/null +++ b/messenger/emailer.go @@ -0,0 +1,94 @@ +package messenger + +import ( + "fmt" + "math/rand" + "net/smtp" + "time" + + "github.com/jordan-wright/email" +) + +const emName = "email" + +// Server represents an SMTP server's credentials. +type Server struct { + Name string + Host string `mapstructure:"host"` + Port int `mapstructure:"port"` + AuthProtocol string `mapstructure:"auth_protocol"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` + SendTimeout time.Duration `mapstructure:"send_timeout"` + MaxConns int `mapstructure:"max_conns"` + + mailer *email.Pool +} + +type emailer struct { + servers map[string]*Server + serverNames []string + numServers int +} + +// NewEmailer creates and returns an e-mail Messenger backend. +// It takes multiple SMTP configurations. +func NewEmailer(srv ...Server) (Messenger, error) { + e := &emailer{ + servers: make(map[string]*Server), + } + + for _, s := range srv { + var auth smtp.Auth + if s.AuthProtocol == "cram" { + auth = smtp.CRAMMD5Auth(s.Username, s.Password) + } else { + auth = smtp.PlainAuth("", s.Username, s.Password, s.Host) + } + + pool, err := email.NewPool(fmt.Sprintf("%s:%d", s.Host, s.Port), 4, auth) + if err != nil { + return nil, err + } + + s.mailer = pool + e.servers[s.Name] = &s + e.serverNames = append(e.serverNames, s.Name) + } + + e.numServers = len(e.serverNames) + return e, nil +} + +// Name returns the Server's name. +func (e *emailer) Name() string { + return emName +} + +// Push pushes a message to the server. +func (e *emailer) Push(fromAddr, toAddr, subject string, m []byte) error { + var key string + + // If there are more than one SMTP servers, send to a random + // one from the list. + if e.numServers > 1 { + key = e.serverNames[rand.Intn(e.numServers)] + } else { + key = e.serverNames[0] + } + + srv := e.servers[key] + err := srv.mailer.Send(&email.Email{ + From: fromAddr, + To: []string{toAddr}, + Subject: subject, + HTML: m, + }, srv.SendTimeout) + + return err +} + +// Flush flushes the message queue to the server. +func (e *emailer) Flush() error { + return nil +} diff --git a/messenger/messenger.go b/messenger/messenger.go new file mode 100644 index 0000000..278f862 --- /dev/null +++ b/messenger/messenger.go @@ -0,0 +1,10 @@ +package messenger + +// Messenger is an interface for a generic messaging backend, +// for instance, e-mail, SMS etc. +type Messenger interface { + Name() string + + Push(fromAddr, toAddr, subject string, message []byte) error + Flush() error +} diff --git a/models/models.go b/models/models.go new file mode 100644 index 0000000..5862162 --- /dev/null +++ b/models/models.go @@ -0,0 +1,189 @@ +package models + +import ( + "database/sql/driver" + "encoding/json" + "fmt" + "html/template" + + "github.com/jmoiron/sqlx" + "github.com/jmoiron/sqlx/types" + "github.com/lib/pq" + + null "gopkg.in/volatiletech/null.v6" +) + +// Enum values for various statuses. +const ( + // Subscriber. + SubscriberStatusEnabled = "enabled" + SubscriberStatusDisabled = "disabled" + SubscriberStatusBlackListed = "blacklisted" + + // Campaign. + CampaignStatusDraft = "draft" + CampaignStatusScheduled = "scheduled" + CampaignStatusRunning = "running" + CampaignStatusPaused = "paused" + CampaignStatusFinished = "finished" + CampaignStatusCancelled = "cancelled" + + // List. + ListTypePrivate = "private" + ListTypePublic = "public" + + // User. + UserTypeSuperadmin = "superadmin" + UserTypeUser = "user" + UserStatusEnabled = "enabled" + UserStatusDisabled = "disabled" +) + +// Base holds common fields shared across models. +type Base struct { + ID int `db:"id" json:"id"` + CreatedAt null.Time `db:"created_at" json:"created_at"` + UpdatedAt null.Time `db:"updated_at" json:"updated_at"` +} + +// User represents an admin user. +type User struct { + Base + + Email string `json:"email"` + Name string `json:"name"` + Password string `json:"-"` + Type string `json:"type"` + Status string `json:"status"` +} + +// Subscriber represents an e-mail subscriber. +type Subscriber struct { + Base + + UUID string `db:"uuid" json:"uuid"` + Email string `db:"email" json:"email"` + Name string `db:"name" json:"name"` + Attribs SubscriberAttribs `db:"attribs" json:"attribs"` + Status string `db:"status" json:"status"` + CampaignIDs pq.Int64Array `db:"campaigns" json:"-"` + Lists []List `json:"lists"` +} + +// SubscriberAttribs is the map of key:value attributes of a subscriber. +type SubscriberAttribs map[string]interface{} + +// Subscribers represents a slice of Subscriber. +type Subscribers []Subscriber + +// List represents a mailing list. +type List struct { + Base + + UUID string `db:"uuid" json:"uuid"` + Name string `db:"name" json:"name"` + Type string `db:"type" json:"type"` + Tags pq.StringArray `db:"tags" json:"tags"` + SubscriberCount int `db:"subscriber_count" json:"subscriber_count"` + SubscriberID int `db:"subscriber_id" json:"-"` + + // This is only relevant when querying the lists of a subscriber. + SubscriptionStatus string `db:"subscription_status" json:"subscription_status,omitempty"` +} + +// Campaign represents an e-mail campaign. +type Campaign struct { + Base + CampaignMeta + + UUID string `db:"uuid" json:"uuid"` + Name string `db:"name" json:"name"` + Subject string `db:"subject" json:"subject"` + FromEmail string `db:"from_email" json:"from_email"` + Body string `db:"body" json:"body,omitempty"` + SendAt null.Time `db:"send_at" json:"send_at"` + Status string `db:"status" json:"status"` + ContentType string `db:"content_type" json:"content_type"` + Tags pq.StringArray `db:"tags" json:"tags"` + TemplateID int `db:"template_id" json:"template_id"` + MessengerID string `db:"messenger" json:"messenger"` + Lists types.JSONText `json:"lists"` + + // TemplateBody is joined in from templates by the next-campaigns query. + TemplateBody string `db:"template_body" json:"-"` + Tpl *template.Template `json:"-"` +} + +// CampaignMeta contains fields tracking a campaign's progress. +type CampaignMeta struct { + StartedAt null.Time `db:"started_at" json:"started_at"` + ToSend int `db:"to_send" json:"to_send"` + Sent int `db:"sent" json:"sent"` +} + +// Campaigns represents a slice of Campaign. +type Campaigns []Campaign + +// Media represents an uploaded media item. +type Media struct { + ID int `db:"id" json:"id"` + UUID string `db:"uuid" json:"uuid"` + Filename string `db:"filename" json:"filename"` + Width int `db:"width" json:"width"` + Height int `db:"height" json:"height"` + CreatedAt null.Time `db:"created_at" json:"created_at"` + + ThumbURI string `json:"thumb_uri"` + URI string `json:"uri"` +} + +// Template represents a reusable e-mail template. +type Template struct { + Base + + Name string `db:"name" json:"name"` + Body string `db:"body" json:"body,omitempty"` + IsDefault bool `db:"is_default" json:"is_default"` +} + +// LoadLists lazy loads the lists for all the subscribers +// in the Subscribers slice and attaches them to their []Lists property. +func (subs Subscribers) LoadLists(stmt *sqlx.Stmt) error { + var ( + lists []List + subIDs = make([]int, len(subs)) + ) + for i := 0; i < len(subs); i++ { + subIDs[i] = subs[i].ID + subs[i].Lists = make([]List, 0) + } + + err := stmt.Select(&lists, pq.Array(subIDs)) + if err != nil { + return err + } + + // Loop through each list and attach it to the subscribers by ID. + for _, l := range lists { + for i := 0; i < len(subs); i++ { + if l.SubscriberID == subs[i].ID { + subs[i].Lists = append(subs[i].Lists, l) + } + } + } + + return nil +} + +// Value returns the JSON marshalled SubscriberAttribs. +func (s SubscriberAttribs) Value() (driver.Value, error) { + return json.Marshal(s) +} + +// Scan unmarshals JSON into SubscriberAttribs. +func (s SubscriberAttribs) Scan(src interface{}) error { + if data, ok := src.([]byte); ok { + return json.Unmarshal(data, &s) + } + return fmt.Errorf("Could not not decode type %T -> %T", src, s) +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ec958d4 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "qs": "^6.5.2" + } +} diff --git a/public.go b/public.go new file mode 100644 index 0000000..c765e78 --- /dev/null +++ b/public.go @@ -0,0 +1,80 @@ +package main + +import ( + "html/template" + "io" + "net/http" + "regexp" + "strconv" + + "github.com/labstack/echo" +) + +type Template struct { + templates *template.Template +} + +type publicTpl struct { + Title string + Description string +} + +type unsubTpl struct { + publicTpl + Blacklisted bool +} + +type errorTpl struct { + publicTpl + + ErrorTitle string + ErrorMessage string +} + +var regexValidUUID = regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$") + +func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error { + // fmt.Println(t.templates.ExecuteTemplate(os.Stdout, name, nil)) + return t.templates.ExecuteTemplate(w, name, data) +} + +// handleUnsubscribePage unsubscribes a subscriber and renders a view. +func handleUnsubscribePage(c echo.Context) error { + var ( + app = c.Get("app").(*App) + campUUID = c.Param("campUUID") + subUUID = c.Param("subUUID") + blacklist, _ = strconv.ParseBool(c.FormValue("blacklist")) + + out = unsubTpl{} + ) + out.Blacklisted = blacklist + out.Title = "Unsubscribe from mailing list" + + if !regexValidUUID.MatchString(campUUID) || + !regexValidUUID.MatchString(subUUID) { + err := errorTpl{} + err.Title = "Invalid request" + err.ErrorTitle = err.Title + err.ErrorMessage = "The unsubscription request contains invalid IDs. Please make sure to follow the correct link." + return c.Render(http.StatusBadRequest, "error", err) + } + + // Unsubscribe. + res, err := app.Queries.Unsubscribe.Exec(campUUID, subUUID, blacklist) + if err != nil { + app.Logger.Printf("Error unsubscribing : %v", err) + return echo.NewHTTPError(http.StatusBadRequest, "Subscription doesn't exist") + } + + num, err := res.RowsAffected() + if num == 0 { + err := errorTpl{} + err.Title = "Invalid subscription" + err.ErrorTitle = err.Title + err.ErrorMessage = "Looks like you are not subscribed to this mailing list." + return c.Render(http.StatusBadRequest, "error", err) + } + + return c.Render(http.StatusOK, "unsubscribe", out) +} diff --git a/public/static/logo.svg b/public/static/logo.svg new file mode 100644 index 0000000..1f8306e --- /dev/null +++ b/public/static/logo.svg @@ -0,0 +1,121 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/public/static/script.js b/public/static/script.js new file mode 100644 index 0000000..e69de29 diff --git a/public/static/style.css b/public/static/style.css new file mode 100644 index 0000000..533e89d --- /dev/null +++ b/public/static/style.css @@ -0,0 +1,71 @@ +/* Flexit grid */ +.container{position:relative;width:100%;max-width:960px;margin:0 auto;padding:0 10px;box-sizing:border-box}.row{box-sizing:border-box;display:flex;flex:0 1 auto;flex-flow:row wrap}.columns,.column{box-sizing:border-box;flex-grow:1;flex-shrink:1;flex-basis:1;margin:10px 0 10px 4%}.column:first-child,.columns:first-child{margin-left:0}.one{max-width:4.6666666667%}.two{max-width:13.3333333333%}.three{max-width:22%}.four{max-width:30.6666666667%}.five{max-width:39.3333333333%}.six{max-width:48%}.seven{max-width:56.6666666667%}.eight{max-width:65.3333333333%}.nine{max-width:74%}.ten{max-width:82.6666666667%}.eleven{max-width:91.3333333333%}.twelve{max-width:100%;margin-left:0}.column-offset-0{margin-left:0}.column-offset-1{margin-left:8.33333333%}.column-offset-2{margin-left:16.66666667%}.column-offset-3{margin-left:25%}.column-offset-4{margin-left:33.33333333%}.column-offset-5{margin-left:41.66666667%}.column-offset-6{margin-left:50%}.column-offset-7{margin-left:58.33333333%}.column-offset-8{margin-left:66.66666667%}.column-offset-9{margin-left:75%}.column-offset-10{margin-left:83.33333333%}.column-offset-11{margin-left:91.66666667%}.between{justify-content:space-between}.evenly{justify-content:space-evenly}.around{justify-content:space-around}.center{justify-content:center;text-align:center}.start{justify-content:flex-start}.end{justify-content:flex-end}.top{align-items:flex-start}.bottom{align-items:flex-end}.middle{align-items:center}.first{order:-1}.last{order:1}.vertical{flex-flow:column wrap}.row-align-center{align-items:center}.space-right{margin-right:10px}.space-left{margin-left:10px}.space-bottom{margin-bottom:10px}.space-top{margin-top:10px}@media screen and (max-width: 768px){.container{overflow:auto}.columns,.column{min-width:100%;margin:10px 0}.column-offset-0,.column-offset-1,.column-offset-2,.column-offset-3,.column-offset-4,.column-offset-5,.column-offset-6,.column-offset-7,.column-offset-8,.column-offset-9,.column-offset-10,.column-offset-11{margin:unset}}/*# sourceMappingURL=dist/flexit.min.css.map */ + +body { + background: #f9f9f9; + font-family: "Open Sans", "Helvetica Neue", sans-serif; + font-size: 16px; + line-height: 28px; + color: #111; +} + +a { + color: #000; +} + +h1, h2, h3, h4 { + font-weight: 400; +} + +.button { + border: 0; + background: transparent; + padding: 10px 30px; + border-radius: 3px; + border: 1px solid #ddd; + cursor: pointer; + text-decoration: none; + color: #111; + display: inline-block; +} + .button:hover { + background: #f3f3f3; + } + +.wrap { + background: #fff; + margin-top: 60px; + max-width: 600px; + padding: 45px; + box-shadow: 2px 2px 0 #f3f3f3; + border: 1px solid #eee; +} + +.header { + margin-bottom: 60px; +} + .header .logo img { + width: auto; + max-height: 24px; + } + +.unsub-all { + margin-top: 30px; + padding-top: 30px; + border-top: 1px solid #eee; +} + +.footer { + text-align: center; + color: #aaa; + font-size: 0.775em; + margin-top: 30px; + margin-bottom: 30px; +} + .footer a { + color: #aaa; + text-decoration: none; + } + .footer a:hover { + color: #111; + } \ No newline at end of file diff --git a/public/templates/error.html b/public/templates/error.html new file mode 100644 index 0000000..d719005 --- /dev/null +++ b/public/templates/error.html @@ -0,0 +1,10 @@ +{{ define "error" }} + {{ template "header" .}} + +

{{ .ErrorTitle }}

+
+ {{ .ErrorMessage }} +
+ + {{ template "footer" .}} +{{ end }} diff --git a/public/templates/hello.html b/public/templates/hello.html new file mode 100644 index 0000000..7769d05 --- /dev/null +++ b/public/templates/hello.html @@ -0,0 +1,3 @@ +{{ define "hello" }} +hello +{{ end }} diff --git a/public/templates/hello2.html b/public/templates/hello2.html new file mode 100644 index 0000000..ffbce4c --- /dev/null +++ b/public/templates/hello2.html @@ -0,0 +1,3 @@ +{{ define "hello" }} +hello2 +{{ end }} diff --git a/public/templates/index.html b/public/templates/index.html new file mode 100644 index 0000000..ffb1eeb --- /dev/null +++ b/public/templates/index.html @@ -0,0 +1,46 @@ +{{ define "header" }} + + + + + {{ .Title }} + + + + + + + + +
+
+ +
+{{ end }} + + +{{ define "footer" }} +
+ +
+ +
+ + + + + +{{ end }} diff --git a/public/templates/unsubscribe.html b/public/templates/unsubscribe.html new file mode 100644 index 0000000..1401e3d --- /dev/null +++ b/public/templates/unsubscribe.html @@ -0,0 +1,22 @@ +{{ define "unsubscribe" }} + {{ template "header" .}} + +

You have been unsubscribed

+ {{ if not .Blacklisted }} +
+

+ Unsubscribe from all future communications? +

+
+
+ + +
+ +
+ {{ else }} +

You've been unsubscribed from all future communications.

+ {{ end }} + + {{ template "footer" .}} +{{ end }} diff --git a/queries.go b/queries.go new file mode 100644 index 0000000..4b57dac --- /dev/null +++ b/queries.go @@ -0,0 +1,66 @@ +package main + +import ( + "fmt" + + "github.com/jmoiron/sqlx" +) + +// Queries contains all prepared SQL queries. +type Queries struct { + UpsertSubscriber *sqlx.Stmt `query:"upsert-subscriber"` + GetSubscriber *sqlx.Stmt `query:"get-subscriber"` + GetSubscriberLists *sqlx.Stmt `query:"get-subscriber-lists"` + QuerySubscribers string `query:"query-subscribers"` + QuerySubscribersCount string `query:"query-subscribers-count"` + QuerySubscribersByList string `query:"query-subscribers-by-list"` + QuerySubscribersByListCount string `query:"query-subscribers-by-list-count"` + UpdateSubscriber *sqlx.Stmt `query:"update-subscriber"` + DeleteSubscribers *sqlx.Stmt `query:"delete-subscribers"` + Unsubscribe *sqlx.Stmt `query:"unsubscribe"` + QuerySubscribersIntoLists string `query:"query-subscribers-into-lists"` + + CreateList *sqlx.Stmt `query:"create-list"` + GetLists *sqlx.Stmt `query:"get-lists"` + UpdateList *sqlx.Stmt `query:"update-list"` + DeleteLists *sqlx.Stmt `query:"delete-lists"` + + CreateCampaign *sqlx.Stmt `query:"create-campaign"` + GetCampaigns *sqlx.Stmt `query:"get-campaigns"` + GetCampaignStats *sqlx.Stmt `query:"get-campaign-stats"` + NextCampaigns *sqlx.Stmt `query:"next-campaigns"` + NextCampaignSubscribers *sqlx.Stmt `query:"next-campaign-subscribers"` + GetOneCampaignSubscriber *sqlx.Stmt `query:"get-one-campaign-subscriber"` + UpdateCampaign *sqlx.Stmt `query:"update-campaign"` + UpdateCampaignStatus *sqlx.Stmt `query:"update-campaign-status"` + UpdateCampaignCounts *sqlx.Stmt `query:"update-campaign-counts"` + DeleteCampaign *sqlx.Stmt `query:"delete-campaign"` + + CreateUser *sqlx.Stmt `query:"create-user"` + GetUsers *sqlx.Stmt `query:"get-users"` + UpdateUser *sqlx.Stmt `query:"update-user"` + DeleteUser *sqlx.Stmt `query:"delete-user"` + + InsertMedia *sqlx.Stmt `query:"insert-media"` + GetMedia *sqlx.Stmt `query:"get-media"` + DeleteMedia *sqlx.Stmt `query:"delete-media"` + + CreateTemplate *sqlx.Stmt `query:"create-template"` + GetTemplates *sqlx.Stmt `query:"get-templates"` + UpdateTemplate *sqlx.Stmt `query:"update-template"` + SetDefaultTemplate *sqlx.Stmt `query:"set-default-template"` + DeleteTemplate *sqlx.Stmt `query:"delete-template"` + + // GetStats *sqlx.Stmt `query:"get-stats"` +} + +// connectDB initializes a database connection. +func connectDB(host string, port int, user, pwd, dbName string) (*sqlx.DB, error) { + db, err := sqlx.Connect("postgres", + fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s", host, port, user, pwd, dbName)) + if err != nil { + return nil, err + } + + return db, nil +} diff --git a/queries.sql b/queries.sql new file mode 100644 index 0000000..7298593 --- /dev/null +++ b/queries.sql @@ -0,0 +1,355 @@ +-- subscribers +-- name: get-subscriber +-- Get a single subscriber by id or UUID. +SELECT * FROM subscribers WHERE CASE WHEN $1 > 0 THEN id = $1 ELSE uuid = $2 END; + +-- name: get-subscriber-lists +-- Get lists belonging to subscribers. +SELECT lists.*, subscriber_lists.subscriber_id, subscriber_lists.status AS subscription_status FROM lists + LEFT JOIN subscriber_lists ON (subscriber_lists.list_id = lists.id) + WHERE subscriber_lists.subscriber_id = ANY($1::INT[]); + +-- name: query-subscribers +-- raw: true +-- Unprepared statement for issuring arbitrary WHERE conditions. +SELECT * FROM subscribers WHERE 1=1 %s OFFSET %d LIMIT %d; + +-- name: query-subscribers-count +-- raw: true +SELECT COUNT(id) as num FROM subscribers WHERE 1=1 %s; + +-- name: query-subscribers-by-list +-- raw: true +-- Unprepared statement for issuring arbitrary WHERE conditions. +SELECT subscribers.* FROM subscribers INNER JOIN subscriber_lists + ON (subscriber_lists.subscriber_id = subscribers.id) + WHERE subscriber_lists.list_id = %d + %s + ORDER BY id DESC OFFSET %d LIMIT %d; + +-- name: query-subscribers-by-list-count +-- raw: true +SELECT COUNT(subscribers.id) as num FROM subscribers INNER JOIN subscriber_lists + ON (subscriber_lists.subscriber_id = subscribers.id) + WHERE subscriber_lists.list_id = %d + %s; + +-- name: upsert-subscriber +-- In case of updates, if $6 (override_status) is true, only then, the existing +-- value is overwritten with the incoming value. This is used for insertions and bulk imports. +WITH s AS ( + INSERT INTO subscribers (uuid, email, name, status, attribs) + VALUES($1, $2, $3, $4, $5) ON CONFLICT (email) DO UPDATE + SET name=$3, status=(CASE WHEN $6 = true THEN $4 ELSE subscribers.status END), + attribs=$5, updated_at=NOW() + RETURNING id +) INSERT INTO subscriber_lists (subscriber_id, list_id) + VALUES((SELECT id FROM s), UNNEST($7::INT[]) ) + ON CONFLICT (subscriber_id, list_id) DO NOTHING + RETURNING subscriber_id; + +-- name: update-subscriber +-- Updates a subscriber's data, and given a list of list_ids, inserts subscriptions +-- for them while deleting existing subscriptions not in the list. +WITH s AS ( + UPDATE subscribers SET + email=(CASE WHEN $2 != '' THEN $2 ELSE email END), + name=(CASE WHEN $3 != '' THEN $3 ELSE name END), + status=(CASE WHEN $4 != '' THEN $4::subscriber_status ELSE status END), + attribs=(CASE WHEN $5::TEXT != '' THEN $5::JSONB ELSE attribs END), + updated_at=NOW() + WHERE id = $1 RETURNING id +), +d AS ( + DELETE FROM subscriber_lists WHERE subscriber_id = $1 AND list_id != ALL($6) +) +INSERT INTO subscriber_lists (subscriber_id, list_id) + VALUES( (SELECT id FROM s), UNNEST($6) ) + ON CONFLICT (subscriber_id, list_id) DO NOTHING; + +-- name: delete-subscribers +-- Delete one or more subscribers. +DELETE FROM subscribers WHERE id = ALL($1); + +-- name: unsubscribe +-- Unsubscribes a subscriber given a campaign UUID (from all the lists in the campaign) and the subscriber UUID. +-- If $3 is TRUE, then all subscriptions of the subscriber is blacklisted +-- and all existing subscriptions, irrespective of lists, unsubscribed. +WITH lists AS ( + -- SELECT (JSONB_ARRAY_ELEMENTS(lists)->>'id')::INT AS list_id FROM campaigns WHERE uuid = $1 + SELECT * from campaigns where uuid=$1 +), +sub AS ( + UPDATE subscribers SET status = (CASE WHEN $3 IS TRUE THEN 'blacklisted' ELSE status END) + WHERE uuid = $2 RETURNING id +) +UPDATE subscriber_lists SET status = 'unsubscribed' WHERE + subscriber_id = (SELECT id FROM sub) AND + CASE WHEN $3 IS FALSE THEN list_id = ANY(SELECT list_id FROM lists) ELSE list_id != 0 END; + +-- name: query-subscribers-into-lists +-- raw: true +-- Unprepared statement for issuring arbitrary WHERE conditions and getting +-- the resultant subscriber IDs into subscriber_lists. +WITH subs AS ( + SELECT id FROM subscribers WHERE status != 'blacklisted' %s +) +INSERT INTO subscriber_lists (subscriber_id, list_id) + (SELECT id, UNNEST($1::INT[]) FROM subs) + ON CONFLICT (subscriber_id, list_id) DO NOTHING; + +-- lists +-- name: get-lists +SELECT lists.*, COUNT(subscriber_lists.subscriber_id) AS subscriber_count + FROM lists LEFT JOIN subscriber_lists + ON (subscriber_lists.list_id = lists.id AND subscriber_lists.status != 'unsubscribed') + WHERE ($1 = 0 OR id = $1) + GROUP BY lists.id ORDER BY lists.created_at; + +-- name: create-list +INSERT INTO lists (uuid, name, type, tags) VALUES($1, $2, $3, $4) RETURNING id; + +-- name: update-list +UPDATE lists SET + name=(CASE WHEN $2 != '' THEN $2 ELSE name END), + type=(CASE WHEN $3 != '' THEN $3::list_type ELSE type END), + tags=(CASE WHEN ARRAY_LENGTH($4::VARCHAR(100)[], 1) > 0 THEN $4 ELSE tags END), + updated_at=NOW() +WHERE id = $1; + +-- name: delete-lists +DELETE FROM lists WHERE id = ALL($1); + + +-- campaigns +-- name: create-campaign +-- This creates the campaign and inserts campaign_lists relationships. +WITH counts AS ( + SELECT COUNT(id) as to_send, MAX(id) as max_sub_id + FROM subscribers + LEFT JOIN subscriber_lists ON (subscribers.id = subscriber_lists.subscriber_id) + WHERE subscriber_lists.list_id=ANY($11::INT[]) + AND subscribers.status='enabled' +), +camp AS ( + INSERT INTO campaigns (uuid, name, subject, from_email, body, content_type, send_at, tags, messenger, template_id, to_send, max_subscriber_id) + SELECT $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, + (SELECT to_send FROM counts), + (SELECT max_sub_id FROM counts) + WHERE (SELECT COALESCE(MAX(to_send), 0) FROM counts) > 0 + RETURNING id +) +INSERT INTO campaign_lists (campaign_id, list_id, list_name) + (SELECT (SELECT id FROM camp), id, name FROM lists WHERE id=ANY($11::INT[])) + RETURNING (SELECT id FROM camp); + +-- name: get-campaigns +-- Here, 'lists' is returned as an aggregated JSON array from campaign_lists because +-- the list reference may have been deleted. +SELECT campaigns.*, ( + SELECT COALESCE(ARRAY_TO_JSON(ARRAY_AGG(l)), '[]') FROM ( + SELECT COALESCE(campaign_lists.list_id, 0) AS id, + campaign_lists.list_name AS name + FROM campaign_lists WHERE campaign_lists.campaign_id = campaigns.id + ) l +) AS lists +FROM campaigns +WHERE ($1 = 0 OR id = $1) AND status=(CASE WHEN $2 != '' THEN $2::campaign_status ELSE status END) +ORDER BY created_at DESC OFFSET $3 LIMIT $4; + +-- name: get-campaign-for-preview +SELECT campaigns.*, COALESCE(templates.body, (SELECT body FROM templates WHERE is_default = true LIMIT 1)) AS template_body +FROM campaigns +LEFT JOIN templates ON (templates.id = campaigns.template_id) +WHERE (status='running' OR (status='scheduled' AND campaigns.send_at >= NOW())) +AND NOT(campaigns.id = ANY($1::INT[])) + +-- name: get-campaign-stats +SELECT id, status, to_send, sent, started_at, updated_at + FROM campaigns + WHERE status=$1; + +-- name: next-campaigns +-- Retreives campaigns that are running (or scheduled and the time's up) and need +-- to be processed. It updates the to_send count and max_subscriber_id of the campaign, +-- that is, the total number of subscribers to be processed across all lists of a campaign. +-- Thus, it has a sideaffect. +-- In addition, it finds the max_subscriber_id, the upper limit across all lists of +-- a campaign. This is used to fetch and slice subscribers for the campaign in next-subscriber-campaigns. +WITH camps AS ( + -- Get all running campaigns and their template bodies (if the template's deleted, the default template body instead) + SELECT campaigns.*, COALESCE(templates.body, (SELECT body FROM templates WHERE is_default = true LIMIT 1)) AS template_body + FROM campaigns + LEFT JOIN templates ON (templates.id = campaigns.template_id) + WHERE (status='running' OR (status='scheduled' AND campaigns.send_at >= NOW())) + AND NOT(campaigns.id = ANY($1::INT[])) +), +counts AS ( + -- For each campaign above, get the total number of subscribers and the max_subscriber_id across all its lists. + SELECT campaign_id, COUNT(subs.id) as to_send, COALESCE(MAX(subs.id), 0) as max_subscriber_id + FROM subscribers subs, subscriber_lists sublists, campaign_lists camplists + WHERE sublists.list_id = camplists.list_id AND + subs.id = sublists.subscriber_id + AND camplists.campaign_id = ANY(SELECT id FROM camps) + GROUP BY camplists.campaign_id +), +u AS ( + -- For each campaign above, update the to_send count. + UPDATE campaigns AS ca + SET to_send = co.to_send, max_subscriber_id = co.max_subscriber_id + FROM (SELECT * FROM counts) co + WHERE ca.id = co.campaign_id AND ca.to_send != co.to_send +) +SELECT * FROM camps; + +-- name: next-campaign-subscribers +-- Returns a batch of subscribers in a given campaign starting from the last checkpoint +-- (last_subscriber_id). Every fetch updates the checkpoint and the sent count, which means +-- every fetch returns a new batch of subscribers until all rows are exhausted. +WITH camp AS ( + SELECT last_subscriber_id, max_subscriber_id + FROM campaigns + WHERE id=$1 AND status='running' +), +subs AS ( + SELECT * FROM subscribers + LEFT JOIN subscriber_lists ON (subscribers.id = subscriber_lists.subscriber_id AND subscriber_lists.status != 'unsubscribed') + WHERE subscriber_lists.list_id=ANY( + SELECT list_id FROM campaign_lists where campaign_id=$1 AND list_id IS NOT NULL + ) + AND id > (SELECT last_subscriber_id FROM camp) + AND id <= (SELECT max_subscriber_id FROM camp) + ORDER BY id LIMIT $2 +), +u AS ( + UPDATE campaigns + SET last_subscriber_id=(SELECT MAX(id) FROM subs), + sent=sent + (SELECT COUNT(id) FROM subs), + updated_at=NOW() + WHERE (SELECT COUNT(id) FROM subs) > 0 AND id=$1 +) +SELECT * FROM subs; + +-- name: get-one-campaign-subscriber +SELECT * FROM subscribers +LEFT JOIN subscriber_lists ON (subscribers.id = subscriber_lists.subscriber_id AND subscriber_lists.status != 'unsubscribed') +WHERE subscriber_lists.list_id=ANY( + SELECT list_id FROM campaign_lists where campaign_id=$1 AND list_id IS NOT NULL +) +LIMIT 1; + +-- name: update-campaign +WITH camp AS ( + UPDATE campaigns SET + name=(CASE WHEN $2 != '' THEN $2 ELSE name END), + subject=(CASE WHEN $3 != '' THEN $3 ELSE subject END), + from_email=(CASE WHEN $4 != '' THEN $4 ELSE from_email END), + body=(CASE WHEN $5 != '' THEN $5 ELSE body END), + content_type=(CASE WHEN $6 != '' THEN $6::content_type ELSE content_type END), + send_at=(CASE WHEN $7 != '' THEN $7::TIMESTAMP WITH TIME ZONE ELSE send_at END), + tags=(CASE WHEN ARRAY_LENGTH($8::VARCHAR(100)[], 1) > 0 THEN $8 ELSE tags END), + template_id=(CASE WHEN $9 != 0 THEN $9 ELSE template_id END), + updated_at=NOW() + WHERE id = $1 RETURNING id +), + -- Reset the relationships +d AS ( + DELETE FROM campaign_lists WHERE campaign_id = $1 +) +INSERT INTO campaign_lists (campaign_id, list_id, list_name) + (SELECT $1 as campaign_id, id, name FROM lists WHERE id=ANY($10::INT[])) + ON CONFLICT (campaign_id, list_id) DO UPDATE SET list_name = EXCLUDED.list_name; + +-- name: update-campaign-counts +UPDATE campaigns SET + to_send=(CASE WHEN $2 != 0 THEN $2 ELSE to_send END), + sent=(CASE WHEN $3 != 0 THEN $3 ELSE sent END), + last_subscriber_id=(CASE WHEN $4 != 0 THEN $4 ELSE last_subscriber_id END), + updated_at=NOW() +WHERE id=$1; + +-- name: update-campaign-status +UPDATE campaigns SET status=$2, updated_at=NOW() WHERE id = $1; + +-- name: delete-campaign +DELETE FROM campaigns WHERE id=$1 AND (status = 'draft' OR status = 'scheduled'); + +-- users +-- name: get-users +SELECT * FROM users WHERE $1 = 0 OR id = $1 OFFSET $2 LIMIT $3; + +-- name: create-user +INSERT INTO users (email, name, password, type, status) VALUES($1, $2, $3, $4, $5) RETURNING id; + +-- name: update-user +UPDATE users SET + email=(CASE WHEN $2 != '' THEN $2 ELSE email END), + name=(CASE WHEN $3 != '' THEN $3 ELSE name END), + password=(CASE WHEN $4 != '' THEN $4 ELSE password END), + type=(CASE WHEN $5 != '' THEN $5::user_type ELSE type END), + status=(CASE WHEN $6 != '' THEN $6::user_status ELSE status END), + updated_at=NOW() +WHERE id = $1; + +-- name: delete-user +-- Delete a user, except for the primordial super admin. +DELETE FROM users WHERE $1 != 1 AND id=$1; + + +-- templates +-- name: get-templates +-- Only if the second param ($2) is true, body is returned. +SELECT id, name, (CASE WHEN $2 = false THEN body ELSE '' END) as body, + is_default, created_at, updated_at + FROM templates WHERE $1 = 0 OR id = $1 + ORDER BY created_at; + +-- name: create-template +INSERT INTO templates (name, body) VALUES($1, $2) RETURNING id; + +-- name: update-template +UPDATE templates SET + name=(CASE WHEN $2 != '' THEN $2 ELSE name END), + body=(CASE WHEN $3 != '' THEN $3 ELSE body END), + updated_at=NOW() +WHERE id = $1; + +-- name: set-default-template +WITH u AS ( + UPDATE templates SET is_default=true WHERE id=$1 RETURNING id +) +UPDATE templates SET is_default=false WHERE id != $1; + +-- name: delete-template +-- Delete a template as long as there's more than one. +DELETE FROM templates WHERE id=$1 AND (SELECT COUNT(id) FROM templates) > 1 AND is_default = false; + +-- media +-- name: insert-media +INSERT INTO media (uuid, filename, thumb, width, height, created_at) VALUES($1, $2, $3, $4, $5, NOW()); + +-- name: get-media +SELECT * FROM media ORDER BY created_at DESC; + +-- name: delete-media +DELETE FROM media WHERE id=$1 RETURNING filename; + +-- -- name: get-stats +-- WITH lists AS ( +-- SELECT type, COUNT(id) AS num FROM lists GROUP BY type +-- ), +-- subs AS ( +-- SELECT status, COUNT(id) AS num FROM subscribers GROUP by status +-- ), +-- orphans AS ( +-- SELECT COUNT(id) FROM subscribers LEFT JOIN subscriber_lists ON (subscribers.id = subscriber_lists.subscriber_id) +-- WHERE subscriber_lists.subscriber_id IS NULL +-- ), +-- camps AS ( +-- SELECT status, COUNT(id) AS num FROM campaigns GROUP by status +-- ) +-- SELECT JSON_BUILD_OBJECT('lists', lists); +-- row_to_json(t) +-- from ( +-- select type, num from lists +-- ) t, \ No newline at end of file diff --git a/runner/runner.go b/runner/runner.go new file mode 100644 index 0000000..561c529 --- /dev/null +++ b/runner/runner.go @@ -0,0 +1,305 @@ +package runner + +import ( + "bytes" + "fmt" + "html/template" + "log" + "time" + + "github.com/knadh/listmonk/messenger" + "github.com/knadh/listmonk/models" +) + +const ( + batchSize = 10000 + + // BaseTPL is the name of the base template. + BaseTPL = "base" + + // ContentTpl is the name of the compiled message. + ContentTpl = "content" +) + +// DataSource represents a data backend, such as a database, +// that provides subscriber and campaign records. +type DataSource interface { + NextCampaigns(excludeIDs []int64) ([]*models.Campaign, error) + NextSubscribers(campID, limit int) ([]*models.Subscriber, error) + GetCampaign(campID int) (*models.Campaign, error) + PauseCampaign(campID int) error + CancelCampaign(campID int) error + FinishCampaign(campID int) error +} + +// Runner handles the scheduling, processing, and queuing of campaigns +// and message pushes. +type Runner struct { + cfg Config + src DataSource + messengers map[string]messenger.Messenger + logger *log.Logger + + // Campaigns that are currently running. + camps map[int]*models.Campaign + + msgQueue chan Message + subFetchQueue chan *models.Campaign +} + +// Message represents an active subscriber that's being processed. +type Message struct { + Campaign *models.Campaign + Subscriber *models.Subscriber + UnsubscribeURL string + + body []byte + to string +} + +// Config has parameters for configuring the runner. +type Config struct { + Concurrency int + UnsubscribeURL string +} + +// New returns a new instance of Mailer. +func New(cfg Config, src DataSource, l *log.Logger) *Runner { + r := Runner{ + cfg: cfg, + messengers: make(map[string]messenger.Messenger), + src: src, + camps: make(map[int]*models.Campaign, 0), + logger: l, + subFetchQueue: make(chan *models.Campaign, 100), + msgQueue: make(chan Message, cfg.Concurrency), + } + + return &r +} + +// AddMessenger adds a Messenger messaging backend to the runner process. +func (r *Runner) AddMessenger(msg messenger.Messenger) error { + id := msg.Name() + if _, ok := r.messengers[id]; ok { + return fmt.Errorf("messenger '%s' is already loaded", id) + } + r.messengers[id] = msg + + return nil +} + +// GetMessengerNames returns the list of registered messengers. +func (r *Runner) GetMessengerNames() []string { + var names []string + for n := range r.messengers { + names = append(names, n) + } + + return names +} + +// HasMessenger checks if a given messenger is registered. +func (r *Runner) HasMessenger(id string) bool { + _, ok := r.messengers[id] + return ok +} + +// Run is a blocking function (and hence should be invoked as a goroutine) +// that scans the source db at regular intervals for pending campaigns, +// and queues them for processing. The process queue fetches batches of +// subscribers and pushes messages to them for each queued campaign +// until all subscribers are exhausted, at which point, a campaign is marked +// as "finished". +func (r *Runner) Run(tick time.Duration) { + var ( + tScanCampaigns = time.NewTicker(tick) + ) + + for { + select { + // Fetch all 'running campaigns that aren't being processed. + case <-tScanCampaigns.C: + campaigns, err := r.src.NextCampaigns(r.getPendingCampaignIDs()) + if err != nil { + r.logger.Printf("error fetching campaigns: %v", err) + return + } + + for _, c := range campaigns { + if err := r.addCampaign(c); err != nil { + r.logger.Printf("error processing campaign (%s): %v", c.Name, err) + continue + } + + r.logger.Printf("start processing campaign (%s)", c.Name) + r.subFetchQueue <- c + } + + // Fetch next set of subscribers for the incoming campaign ID + // and process them. + case c := <-r.subFetchQueue: + has, err := r.nextSubscribers(c, batchSize) + if err != nil { + r.logger.Printf("error processing campaign batch (%s): %v", c.Name, err) + } + + if has { + // There are more subscribers to fetch. + r.subFetchQueue <- c + } else { + // No subscribers. + if err := r.processExhaustedCampaign(c); err != nil { + r.logger.Printf("error processing campaign (%s): %v", c.Name, err) + } + } + } + } +} + +// SpawnWorkers spawns workers goroutines that push out messages. +func (r *Runner) SpawnWorkers() { + for i := 0; i < r.cfg.Concurrency; i++ { + go func(ch chan Message) { + for { + select { + case m := <-ch: + r.messengers[m.Campaign.MessengerID].Push( + m.Campaign.FromEmail, + m.Subscriber.Email, + m.Campaign.Subject, + m.body) + } + } + }(r.msgQueue) + } +} + +// addCampaign adds a campaign to the process queue. +func (r *Runner) addCampaign(c *models.Campaign) error { + var tplErr error + + c.Tpl, tplErr = CompileMessageTemplate(c.TemplateBody, c.Body) + if tplErr != nil { + return tplErr + } + + // Validate messenger. + if _, ok := r.messengers[c.MessengerID]; !ok { + r.src.CancelCampaign(c.ID) + return fmt.Errorf("unknown messenger %s on campaign %s", c.MessengerID, c.Name) + } + + // Add the campaign to the active map. + r.camps[c.ID] = c + + return nil +} + +// getPendingCampaignIDs returns the IDs of campaigns currently being processed. +func (r *Runner) getPendingCampaignIDs() []int64 { + // Needs to return an empty slice in case there are no campaigns. + ids := make([]int64, 0) + for _, c := range r.camps { + ids = append(ids, int64(c.ID)) + } + + return ids +} + +// nextSubscribers processes the next batch of subscribers in a given campaign. +// If returns a bool indicating whether there any subscribers were processed +// in the current batch or not. This can happen when all the subscribers +// have been processed, or if a campaign has been paused or cancelled abruptly. +func (r *Runner) nextSubscribers(c *models.Campaign, batchSize int) (bool, error) { + // Fetch a batch of subscribers. + subs, err := r.src.NextSubscribers(c.ID, batchSize) + if err != nil { + return false, fmt.Errorf("error fetching campaign subscribers (%s): %v", c.Name, err) + } + + // There are no subscribers. + if len(subs) == 0 { + return false, nil + } + + // Push messages. + for _, s := range subs { + to, body, err := r.makeMessage(c, s) + if err != nil { + r.logger.Printf("error preparing message (%s) (%s): %v", c.Name, s.Email, err) + continue + } + + // Send the message. + r.msgQueue <- Message{Campaign: c, + Subscriber: s, + to: to, + body: body} + } + + return true, nil +} + +func (r *Runner) processExhaustedCampaign(c *models.Campaign) error { + cm, err := r.src.GetCampaign(c.ID) + if err != nil { + return err + } + + // If a running campaign has exhausted subscribers, it's finished. + // Otherwise, it's paused or cancelled. + if cm.Status == models.CampaignStatusRunning { + if err := r.src.FinishCampaign(c.ID); err != nil { + r.logger.Printf("error finishing campaign (%s): %v", c.Name, err) + } else { + r.logger.Printf("campaign (%s) finished", c.Name) + } + } else { + r.logger.Printf("stop processing campaign (%s)", c.Name) + } + + delete(r.camps, c.ID) + return nil +} + +// makeMessage prepares a campaign message for a subscriber and returns +// the 'to' address and the body. +func (r *Runner) makeMessage(c *models.Campaign, s *models.Subscriber) (string, []byte, error) { + // Render the message body. + var ( + out = bytes.Buffer{} + tplMsg = Message{Campaign: c, + Subscriber: s, + UnsubscribeURL: fmt.Sprintf(r.cfg.UnsubscribeURL, c.UUID, s.UUID)} + ) + if err := c.Tpl.ExecuteTemplate(&out, BaseTPL, tplMsg); err != nil { + return "", nil, err + } + + return s.Email, out.Bytes(), nil +} + +// CompileMessageTemplate takes a base template body string and a child (message) template +// body string, compiles both and inserts the child template as the named template "content" +// and returns the resultant template. +func CompileMessageTemplate(baseBody, childBody string) (*template.Template, error) { + // Compile the base template. + baseTPL, err := template.New(BaseTPL).Parse(baseBody) + if err != nil { + return nil, fmt.Errorf("error compiling base template: %v", err) + } + + // Compile the campaign message. + msgTpl, err := template.New(ContentTpl).Parse(childBody) + if err != nil { + return nil, fmt.Errorf("error compiling message: %v", err) + } + + out, err := baseTPL.AddParseTree(ContentTpl, msgTpl.Tree) + if err != nil { + return nil, fmt.Errorf("error inserting child template: %v", err) + } + + return out, nil +} diff --git a/runner_db.go b/runner_db.go new file mode 100644 index 0000000..aecaf6f --- /dev/null +++ b/runner_db.go @@ -0,0 +1,60 @@ +package main + +import ( + "github.com/knadh/listmonk/models" + "github.com/lib/pq" +) + +// runnerDB implements runner.DataSource over the primary +// database. +type runnerDB struct { + queries *Queries +} + +func newRunnerDB(q *Queries) *runnerDB { + return &runnerDB{ + queries: q, + } +} + +// NextCampaigns retrieves active campaigns ready to be processed. +func (r *runnerDB) NextCampaigns(excludeIDs []int64) ([]*models.Campaign, error) { + var out []*models.Campaign + err := r.queries.NextCampaigns.Select(&out, pq.Int64Array(excludeIDs)) + return out, err +} + +// NextSubscribers retrieves a subset of subscribers of a given campaign. +// Since batches are processed sequentially, the retrieval is ordered by ID, +// and every batch takes the last ID of the last batch and fetches the next +// batch above that. +func (r *runnerDB) NextSubscribers(campID, limit int) ([]*models.Subscriber, error) { + var out []*models.Subscriber + err := r.queries.NextCampaignSubscribers.Select(&out, campID, limit) + return out, err +} + +// GetCampaign fetches a campaign from the database. +func (r *runnerDB) GetCampaign(campID int) (*models.Campaign, error) { + var out = &models.Campaign{} + err := r.queries.GetCampaigns.Get(out, campID, "", 0, 1) + return out, err +} + +// PauseCampaign marks a campaign as paused. +func (r *runnerDB) PauseCampaign(campID int) error { + _, err := r.queries.UpdateCampaignStatus.Exec(campID, models.CampaignStatusPaused) + return err +} + +// CancelCampaign marks a campaign as cancelled. +func (r *runnerDB) CancelCampaign(campID int) error { + _, err := r.queries.UpdateCampaignStatus.Exec(campID, models.CampaignStatusCancelled) + return err +} + +// FinishCampaign marks a campaign as finished. +func (r *runnerDB) FinishCampaign(campID int) error { + _, err := r.queries.UpdateCampaignStatus.Exec(campID, models.CampaignStatusFinished) + return err +} diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..b149d83 --- /dev/null +++ b/schema.sql @@ -0,0 +1,169 @@ +DROP TYPE IF EXISTS user_type CASCADE; CREATE TYPE user_type AS ENUM ('superadmin', 'user'); +DROP TYPE IF EXISTS user_status CASCADE; CREATE TYPE user_status AS ENUM ('enabled', 'disabled'); +DROP TYPE IF EXISTS list_type CASCADE; CREATE TYPE list_type AS ENUM ('public', 'private', 'temporary'); +DROP TYPE IF EXISTS subscriber_status CASCADE; CREATE TYPE subscriber_status AS ENUM ('enabled', 'disabled', 'blacklisted'); +DROP TYPE IF EXISTS subscription_status CASCADE; CREATE TYPE subscription_status AS ENUM ('unconfirmed', 'confirmed', 'unsubscribed'); +DROP TYPE IF EXISTS campaign_status CASCADE; CREATE TYPE campaign_status AS ENUM ('draft', 'running', 'scheduled', 'paused', 'cancelled', 'finished'); +DROP TYPE IF EXISTS content_type CASCADE; CREATE TYPE content_type AS ENUM ('richtext', 'html', 'plain'); + +-- users +DROP TABLE IF EXISTS users CASCADE; +CREATE TABLE users ( + id SERIAL PRIMARY KEY, + email TEXT NOT NULL UNIQUE, + name TEXT NOT NULL, + password TEXT NOT NULL, + type user_type NOT NULL, + status user_status NOT NULL, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +DROP INDEX IF EXISTS idx_users_email; CREATE INDEX idx_users_email ON users(email); + +-- subscribers +DROP TABLE IF EXISTS subscribers CASCADE; +CREATE TABLE subscribers ( + id SERIAL PRIMARY KEY, + uuid uuid NOT NULL UNIQUE, + email TEXT NOT NULL UNIQUE, + name TEXT NOT NULL, + attribs JSONB, + status subscriber_status NOT NULL, + campaigns INTEGER[], + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +DROP INDEX IF EXISTS idx_subscribers_email; CREATE INDEX idx_subscribers_email ON subscribers(email); + +-- lists +DROP TABLE IF EXISTS lists CASCADE; +CREATE TABLE lists ( + id SERIAL PRIMARY KEY, + uuid uuid NOT NULL UNIQUE, + name TEXT NOT NULL, + type list_type NOT NULL, + tags VARCHAR(100)[], + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +DROP INDEX IF EXISTS idx_lists_uuid; CREATE INDEX idx_lists_uuid ON lists(uuid); + +DROP TABLE IF EXISTS subscriber_lists CASCADE; +CREATE TABLE subscriber_lists ( + subscriber_id INTEGER REFERENCES subscribers(id) ON DELETE CASCADE ON UPDATE CASCADE, + list_id INTEGER NULL REFERENCES lists(id) ON DELETE CASCADE ON UPDATE CASCADE, + status subscription_status NOT NULL DEFAULT 'unconfirmed', + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + + PRIMARY KEY(subscriber_id, list_id) +); + + +-- templates +DROP TABLE IF EXISTS templates CASCADE; +CREATE TABLE templates ( + id SERIAL PRIMARY KEY, + name TEXT NOT NULL, + body TEXT NOT NULL, + is_default BOOLEAN NOT NULL DEFAULT false, + + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +CREATE UNIQUE INDEX ON templates (is_default) WHERE is_default = true; + + +-- campaigns +DROP TABLE IF EXISTS campaigns CASCADE; +CREATE TABLE campaigns ( + id SERIAL PRIMARY KEY, + uuid uuid NOT NULL UNIQUE, + name TEXT NOT NULL, + subject TEXT NOT NULL, + from_email TEXT NOT NULL, + body TEXT NOT NULL, + content_type content_type NOT NULL DEFAULT 'richtext', + send_at TIMESTAMP WITH TIME ZONE, + status campaign_status NOT NULL DEFAULT 'draft', + tags VARCHAR(100)[], + + -- The ID of the messenger backend used to send this campaign. + messenger TEXT NOT NULL, + + template_id INTEGER REFERENCES templates(id) ON DELETE SET DEFAULT DEFAULT 1, + + -- The lists to which a campaign is sent can change at any point. + -- They can be deleted, or they could be ephmeral. Hence, storing + -- references to the lists table is not possible. The list names and + -- their erstwhile IDs are stored in a JSON blob for posterity. + lists JSONB, + + -- Progress and stats. + to_send INT NOT NULL DEFAULT 0, + sent INT NOT NULL DEFAULT 0, + max_subscriber_id INT NOT NULL DEFAULT 0, + last_subscriber_id INT NOT NULL DEFAULT 0, + + started_at TIMESTAMP WITH TIME ZONE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), + updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); +DROP INDEX IF EXISTS idx_campaigns_uuid; CREATE INDEX idx_campaigns_uuid ON campaigns(uuid); + +DROP TABLE IF EXISTS campaign_lists CASCADE; +CREATE TABLE campaign_lists ( + campaign_id INTEGER NOT NULL REFERENCES campaigns(id) ON DELETE CASCADE ON UPDATE CASCADE, + + -- Lists may be deleted, so list_id is nullable + -- and a copy of the original list name is maintained here. + list_id INTEGER NULL REFERENCES lists(id) ON DELETE SET NULL ON UPDATE CASCADE, + list_name TEXT NOT NULL DEFAULT '' +); +CREATE UNIQUE INDEX ON campaign_lists (campaign_id, list_id); + +DROP TABLE IF EXISTS campaign_views CASCADE; +CREATE TABLE campaign_views ( + id SERIAL PRIMARY KEY, + campaign_id INTEGER REFERENCES campaigns(id) ON DELETE CASCADE ON UPDATE CASCADE, + + -- Subscribers may be deleted, but the link counts should remain. + subscriber_id INTEGER NULL REFERENCES subscribers(id) ON DELETE SET NULL ON UPDATE CASCADE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- media +DROP TABLE IF EXISTS media CASCADE; +CREATE TABLE media ( + id SERIAL PRIMARY KEY, + uuid uuid NOT NULL UNIQUE, + filename TEXT NOT NULL, + thumb TEXT NOT NULL, + width INT NOT NULL DEFAULT 0, + height INT NOT NULL DEFAULT 0, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +-- links +DROP TABLE IF EXISTS links CASCADE; +CREATE TABLE links ( + id SERIAL PRIMARY KEY, + uuid uuid NOT NULL UNIQUE, + url TEXT NOT NULL, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); + +DROP TABLE IF EXISTS link_clicks CASCADE; +CREATE TABLE link_clicks ( + id SERIAL PRIMARY KEY, + campaign_id INTEGER REFERENCES campaigns(id) ON DELETE CASCADE ON UPDATE CASCADE, + link_id INTEGER NULL REFERENCES links(id) ON DELETE CASCADE ON UPDATE CASCADE, + + -- Subscribers may be deleted, but the link counts should remain. + subscriber_id INTEGER NULL REFERENCES subscribers(id) ON DELETE SET NULL ON UPDATE CASCADE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() +); diff --git a/sqlboiler.toml b/sqlboiler.toml new file mode 100644 index 0000000..cb88066 --- /dev/null +++ b/sqlboiler.toml @@ -0,0 +1,6 @@ +[postgres] +dbname="listmonk" +host="localhost" +port=5432 +user="postgres" +pass="postgres" diff --git a/subimporter/importer.go b/subimporter/importer.go new file mode 100644 index 0000000..a63c4b5 --- /dev/null +++ b/subimporter/importer.go @@ -0,0 +1,528 @@ +// Package subimporter implements a bulk ZIP/CSV importer of subscribers. +// It implements a simple queue for buffering imports and committing records +// to DB along with ZIP and CSV handling utilities. It is meant to be used as +// a singleton as each Importer instance is stateful, where it keeps track of +// an import in progress. Only one import should happen on a single importer +// instance at a time. +package subimporter + +import ( + "archive/zip" + "bytes" + "database/sql" + "encoding/csv" + "encoding/json" + "errors" + "io" + "io/ioutil" + "log" + "os" + "strings" + "sync" + + "github.com/lib/pq" + uuid "github.com/satori/go.uuid" + + "github.com/asaskevich/govalidator" + "github.com/knadh/listmonk/models" +) + +const ( + // stdInputMaxLen is the maximum allowed length for a standard input field. + stdInputMaxLen = 200 + + // commitBatchSize is the number of inserts to commit in a single SQL transaction. + commitBatchSize = 10000 + + // SubscriberStatusEnabled indicates that a subscriber is active. + SubscriberStatusEnabled = "enabled" + // SubscriberStatusDisabled indicates that a subscriber is inactive or unsubscribed. + SubscriberStatusDisabled = "disabled" + // SubscriberStatusBlacklisted indicates that a subscriber is blacklisted. + SubscriberStatusBlacklisted = "blacklisted" + + StatusNone = "none" + StatusImporting = "importing" + StatusStopping = "stopping" + StatusFinished = "finished" + StatusFailed = "failed" +) + +// Importer represents the bulk CSV subscriber import system. +type Importer struct { + stmt *sql.Stmt + db *sql.DB + isImporting bool + stop chan bool + + status *Status + sync.RWMutex +} + +// Session represents a single import session. +type Session struct { + im *Importer + subQueue chan models.Subscriber + log *log.Logger + + overrideStatus bool + listIDs []int +} + +// Status reporesents statistics from an ongoing import session. +type Status struct { + Name string `json:"name"` + Total int `json:"total"` + Imported int `json:"imported"` + Status string `json:"status"` + logBuf *bytes.Buffer +} + +// SubReq is a wrapper over the Subscriber model. +type SubReq struct { + models.Subscriber + Lists pq.Int64Array `json:"lists"` +} + +var ( + // ErrIsImporting is thrown when an import request is made while an + // import is already running. + ErrIsImporting = errors.New("import is already running") + + csvHeaders = map[string]bool{"email": true, + "name": true, + "status": true, + "attributes": true} +) + +// New returns a new instance of Importer. +func New(stmt *sql.Stmt, db *sql.DB) *Importer { + im := Importer{ + stmt: stmt, + stop: make(chan bool, 1), + db: db, + status: &Status{Status: StatusNone, logBuf: bytes.NewBuffer(nil)}, + } + + return &im +} + +// NewSession returns an new instance of Session. It takes the name +// of the uploaded file, but doesn't do anything with it but retains it for stats. +func (im *Importer) NewSession(fName string, overrideStatus bool, listIDs []int) (*Session, error) { + if im.getStatus() != StatusNone { + return nil, errors.New("an import is already running") + } + + im.Lock() + im.status = &Status{Status: StatusImporting, + Name: fName, + logBuf: bytes.NewBuffer(nil)} + im.Unlock() + + s := &Session{ + im: im, + log: log.New(im.status.logBuf, "", log.Ldate|log.Ltime), + subQueue: make(chan models.Subscriber, commitBatchSize), + overrideStatus: overrideStatus, + listIDs: listIDs, + } + + s.log.Printf("processing '%s'", fName) + return s, nil +} + +// GetStats returns the global Stats of the importer. +func (im *Importer) GetStats() Status { + im.RLock() + defer im.RUnlock() + + return Status{ + Name: im.status.Name, + Status: im.status.Status, + Total: im.status.Total, + Imported: im.status.Imported, + } +} + +// GetLogs returns the log entries of the last import session. +func (im *Importer) GetLogs() []byte { + im.RLock() + defer im.RUnlock() + + if im.status.logBuf == nil { + return []byte{} + } + + return im.status.logBuf.Bytes() +} + +// setStatus sets the Importer's status. +func (im *Importer) setStatus(status string) { + im.Lock() + im.status.Status = status + im.Unlock() +} + +// setStatus get's the Importer's status. +func (im *Importer) getStatus() string { + im.RLock() + status := im.status.Status + im.RUnlock() + + return status +} + +// incrementImportCount sets the Importer's "imported" counter. +func (im *Importer) incrementImportCount(n int) { + im.Lock() + im.status.Imported += n + im.Unlock() +} + +// Start is a blocking function that selects on a channel queue until all +// subscriber entries in the import session are imported. It should be +// invoked as a goroutine. +func (s *Session) Start() { + var ( + tx *sql.Tx + stmt *sql.Stmt + err error + total = 0 + cur = 0 + + listIDs = make(pq.Int64Array, len(s.listIDs)) + ) + + for i, v := range s.listIDs { + listIDs[i] = int64(v) + } + + for sub := range s.subQueue { + if cur == 0 { + // New transaction batch. + tx, err = s.im.db.Begin() + if err != nil { + s.log.Printf("error creating DB transaction: %v", err) + continue + } + stmt = tx.Stmt(s.im.stmt) + } + + _, err := stmt.Exec( + uuid.NewV4(), + sub.Email, + sub.Name, + sub.Status, + sub.Attribs, + s.overrideStatus, + listIDs) + if err != nil { + s.log.Printf("error executing insert: %v", err) + continue + } + cur++ + total++ + + // Batch size is met. Commit. + if cur%commitBatchSize == 0 { + if err := tx.Commit(); err != nil { + tx.Rollback() + s.log.Printf("error committing to DB: %v", err) + } else { + s.im.incrementImportCount(cur) + s.log.Printf("imported %d", total) + } + + cur = 0 + } + } + + // Queue's closed and there's nothing left to commit. + if cur == 0 { + s.im.setStatus(StatusFinished) + s.log.Printf("imported finished") + return + } + + // Queue's closed and there are records left to commit. + if err := tx.Commit(); err != nil { + tx.Rollback() + s.im.setStatus(StatusFailed) + s.log.Printf("error committing to DB: %v", err) + return + } + + s.im.incrementImportCount(cur) + s.im.setStatus(StatusFinished) + s.log.Printf("imported finished") +} + +// ExtractZIP takes a ZIP file's path and extracts all .csv files in it to +// a temporary directory, and returns the name of the temp directory and the +// list of extracted .csv files. +func (s *Session) ExtractZIP(srcPath string, maxCSVs int) (string, []string, error) { + if s.im.isImporting { + return "", nil, ErrIsImporting + } + + z, err := zip.OpenReader(srcPath) + if err != nil { + return "", nil, err + } + defer z.Close() + + // Create a temporary directory to extract the files. + dir, err := ioutil.TempDir("", "listmonk") + if err != nil { + s.log.Printf("error creating temporary directory for extracting ZIP: %v", err) + return "", nil, err + } + + var files []string + for _, f := range z.File { + fName := f.FileInfo().Name() + + // Skip directories. + if f.FileInfo().IsDir() { + s.log.Printf("skipping directory '%s'", fName) + continue + } + + // Skip files without the .csv extension. + if !strings.Contains(strings.ToLower(fName), "csv") { + s.log.Printf("skipping non .csv file '%s'", fName) + continue + } + + s.log.Printf("extracting '%s'", fName) + src, err := f.Open() + if err != nil { + s.log.Printf("error opening '%s' from ZIP: '%v'", fName, err) + return "", nil, err + } + defer src.Close() + + out, err := os.OpenFile(dir+"/"+fName, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) + if err != nil { + s.log.Printf("error creating '%s/%s': '%v'", dir, fName, err) + return "", nil, err + } + defer out.Close() + + if _, err := io.Copy(out, src); err != nil { + s.log.Printf("error extracting to '%s/%s': '%v'", dir, fName, err) + return "", nil, err + } + s.log.Printf("extracted '%s'", fName) + + files = append(files, fName) + if len(files) > maxCSVs { + s.log.Printf("won't extract any more files. Maximum is %d", maxCSVs) + break + } + } + + return dir, files, nil +} + +// LoadCSV loads a CSV file and validates and imports the subscriber entries in it. +func (s *Session) LoadCSV(srcPath string, delim rune) error { + if s.im.isImporting { + return ErrIsImporting + } + + // Default status is "failed" in case the function + // returns at one of the many possible errors. + failed := true + defer func() { + if failed { + s.im.setStatus(StatusFailed) + } + }() + + f, err := os.Open(srcPath) + if err != nil { + return err + } + + // Count the total number of lines in the file. This doesn't distinguish + // between "blank" and non "blank" lines, and is only used to derive + // the progress percentage for the frontend. + numLines, err := countLines(f) + if err != nil { + s.log.Printf("error counting lines in '%s': '%v'", srcPath, err) + return err + } + s.im.Lock() + s.im.status.Total = numLines + s.im.Unlock() + + // Rewind, now that we've done a linecount on the same handler. + f.Seek(0, 0) + rd := csv.NewReader(f) + rd.Comma = delim + + // Read the header. + csvHdr, err := rd.Read() + if err != nil { + s.log.Printf("error reading header from '%s': '%v'", srcPath, err) + return err + } + + hdrKeys := s.mapCSVHeaders(csvHdr, csvHeaders) + // email, and name are required headers. + if _, ok := hdrKeys["email"]; !ok { + s.log.Printf("'email' column not found in '%s'", srcPath) + return errors.New("'email' column not found") + } + if _, ok := hdrKeys["name"]; !ok { + s.log.Printf("'name' column not found in '%s'", srcPath) + return errors.New("'name' column not found") + } + + var ( + lnHdr = len(hdrKeys) + i = 1 + ) + for { + // Check for the stop signal. + select { + case <-s.im.stop: + failed = false + close(s.subQueue) + s.log.Println("stop request received") + return nil + default: + } + + cols, err := rd.Read() + if err == io.EOF { + break + } else if err != nil { + s.log.Printf("error reading CSV '%s'", err) + return err + } + + lnCols := len(cols) + if lnCols < lnHdr { + s.log.Printf("skipping line %d. column count (%d) does not match minimum header count (%d)", i, lnCols, lnHdr) + continue + } + + // Iterate the key map and based on the indices mapped earlier, + // form a map of key: csv_value, eg: email: user@user.com. + row := make(map[string]string, lnCols) + for key := range csvHeaders { + row[key] = cols[hdrKeys[key]] + } + + // Lowercase to ensure uniqueness in the DB. + row["email"] = strings.ToLower(strings.TrimSpace(row["email"])) + + sub := models.Subscriber{ + Email: row["email"], + Name: row["name"], + Status: row["status"], + } + + // JSON attributes. + if len(row["attributes"]) > 0 { + var ( + attribs models.SubscriberAttribs + b = []byte(row["attributes"]) + ) + if err := json.Unmarshal(b, &attribs); err != nil { + s.log.Printf("skipping invalid attributes JSON on line %d for '%s': %v", i, sub.Email, err) + } else { + sub.Attribs = attribs + } + } + + // Send the subscriber to the queue. + s.subQueue <- sub + + i++ + } + + close(s.subQueue) + failed = false + + return nil +} + +// Stop sends a signal to stop all existing imports. +func (im *Importer) Stop() { + if im.getStatus() != StatusImporting { + im.Lock() + im.status = &Status{Status: StatusNone} + im.Unlock() + return + } + + select { + case im.stop <- true: + im.setStatus(StatusStopping) + default: + } +} + +// mapCSVHeaders takes a list of headers obtained from a CSV file, a map of known headers, +// and returns a new map with each of the headers in the known map mapped by the position (0-n) +// in the given CSV list. +func (s *Session) mapCSVHeaders(csvHdrs []string, knownHdrs map[string]bool) map[string]int { + // Map 0-n column index to the header keys, name: 0, email: 1 etc. + // This is to allow dynamic ordering of columns in th CSV. + hdrKeys := make(map[string]int) + for i, h := range csvHdrs { + if _, ok := knownHdrs[h]; !ok { + s.log.Printf("ignoring unknown header '%s'", h) + continue + } + + hdrKeys[h] = i + } + + return hdrKeys +} + +// ValidateFields validates incoming subscriber field values. +func ValidateFields(s SubReq) error { + if !govalidator.IsEmail(s.Email) { + return errors.New("invalid `email`") + } + if !govalidator.IsByteLength(s.Name, 1, stdInputMaxLen) { + return errors.New("invalid length for `name`") + } + if s.Status != SubscriberStatusEnabled && s.Status != SubscriberStatusDisabled && + s.Status != SubscriberStatusBlacklisted { + return errors.New("invalid `status`") + } + + return nil +} + +// countLines counts the number of line breaks in a file. This does not +// distinguish between "blank" and non "blank" lines. +// Credit: https://stackoverflow.com/a/24563853 +func countLines(r io.Reader) (int, error) { + var ( + buf = make([]byte, 32*1024) + count = 0 + lineSep = []byte{'\n'} + ) + + for { + c, err := r.Read(buf) + count += bytes.Count(buf[:c], lineSep) + + switch { + case err == io.EOF: + return count, nil + + case err != nil: + return count, err + } + } + +} diff --git a/subscribers.go b/subscribers.go new file mode 100644 index 0000000..b631cf8 --- /dev/null +++ b/subscribers.go @@ -0,0 +1,341 @@ +package main + +// !!!!!!!!!!! TODO +// For non-flat JSON attribs, show the advanced editor instead of the key-value editor + +import ( + "context" + "database/sql" + "fmt" + "net/http" + "strconv" + "strings" + + "github.com/asaskevich/govalidator" + "github.com/knadh/listmonk/models" + "github.com/knadh/listmonk/subimporter" + "github.com/labstack/echo" + "github.com/lib/pq" + uuid "github.com/satori/go.uuid" +) + +type subsWrap struct { + Results models.Subscribers `json:"results"` + + Query string `json:"query"` + Total int `json:"total"` + PerPage int `json:"per_page"` + Page int `json:"page"` +} + +type queryAddResp struct { + Count int64 `json:"count"` +} + +type queryAddReq struct { + Query string `json:"query"` + SourceList int `json:"source_list"` + TargetLists pq.Int64Array `json:"target_lists"` +} + +var jsonMap = []byte("{}") + +// handleGetSubscriber handles the retrieval of a single subscriber by ID. +func handleGetSubscriber(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out models.Subscribers + + id, _ = strconv.Atoi(c.Param("id")) + ) + + // Fetch one list. + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid subscriber ID.") + } + + err := app.Queries.GetSubscriber.Select(&out, id, nil) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching subscriber: %s", pqErrMsg(err))) + } else if err == sql.ErrNoRows { + return echo.NewHTTPError(http.StatusBadRequest, "Subscriber not found.") + } + out.LoadLists(app.Queries.GetSubscriberLists) + + return c.JSON(http.StatusOK, okResp{out[0]}) +} + +// handleQuerySubscribers handles querying subscribers based on arbitrary conditions in SQL. +func handleQuerySubscribers(c echo.Context) error { + var ( + app = c.Get("app").(*App) + pg = getPagination(c.QueryParams()) + + // Limit the subscribers to a particular list? + listID, _ = strconv.Atoi(c.FormValue("list_id")) + hasList bool + + // The "WHERE ?" bit. + query = c.FormValue("query") + + out subsWrap + ) + + if listID < 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid `list_id`.") + } else if listID > 0 { + hasList = true + } + + // There's an arbitrary query condition from the frontend. + cond := "" + if query != "" { + cond = " AND " + query + } + + // The SQL queries to be executed are different for global subscribers + // and subscribers belonging to a specific list. + var ( + stmt = "" + stmtCount = "" + ) + if hasList { + stmt = fmt.Sprintf(app.Queries.QuerySubscribersByList, + listID, cond, pg.Offset, pg.Limit) + stmtCount = fmt.Sprintf(app.Queries.QuerySubscribersByListCount, + listID, cond) + } else { + stmt = fmt.Sprintf(app.Queries.QuerySubscribers, + cond, pg.Offset, pg.Limit) + stmtCount = fmt.Sprintf(app.Queries.QuerySubscribersCount, cond) + } + + // Create a readonly transaction to prevent mutations. + tx, err := app.DB.BeginTxx(context.Background(), &sql.TxOptions{ReadOnly: true}) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error preparing query: %v", pqErrMsg(err))) + } + + // Run the actual query. + if err := tx.Select(&out.Results, stmt); err != nil { + tx.Rollback() + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error querying subscribers: %v", pqErrMsg(err))) + } + + // Run the query count. + if err := tx.Get(&out.Total, stmtCount); err != nil { + tx.Rollback() + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error running count query: %v", pqErrMsg(err))) + } + + if err := tx.Commit(); err != nil { + tx.Rollback() + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error in subscriber query transaction: %v", pqErrMsg(err))) + } + + // Lazy load lists for each subscriber. + if err := out.Results.LoadLists(app.Queries.GetSubscriberLists); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching subscriber lists: %v", pqErrMsg(err))) + } + + if len(out.Results) == 0 { + out.Results = make(models.Subscribers, 0) + return c.JSON(http.StatusOK, okResp{out}) + } + + // Meta. + out.Query = query + out.Page = pg.Page + out.PerPage = pg.PerPage + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handleCreateSubscriber handles subscriber creation. +func handleCreateSubscriber(c echo.Context) error { + var ( + app = c.Get("app").(*App) + req subimporter.SubReq + ) + + // Get and validate fields. + if err := c.Bind(&req); err != nil { + return err + } else if err := subimporter.ValidateFields(req); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, err.Error()) + } + + req.Email = strings.ToLower(strings.TrimSpace(req.Email)) + + // Insert and read ID. + var newID int + err := app.Queries.UpsertSubscriber.Get(&newID, + uuid.NewV4(), + req.Email, + req.Name, + req.Status, + req.Attribs, + true, + req.Lists) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error creating subscriber: %v", err)) + } + + // Hand over to the GET handler to return the last insertion. + c.SetParamNames("id") + c.SetParamValues(fmt.Sprintf("%d", newID)) + return c.JSON(http.StatusOK, handleGetSubscriber(c)) +} + +// handleUpdateSubscriber handles subscriber modification. +func handleUpdateSubscriber(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.ParseInt(c.Param("id"), 10, 64) + req subimporter.SubReq + ) + // Get and validate fields. + if err := c.Bind(&req); err != nil { + return err + } + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + if req.Email != "" && !govalidator.IsEmail(req.Email) { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid `email`.") + } + if req.Name != "" && !govalidator.IsByteLength(req.Name, 1, stdInputMaxLen) { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid length for `name`.") + } + + req.Email = strings.ToLower(strings.TrimSpace(req.Email)) + + _, err := app.Queries.UpdateSubscriber.Exec(req.ID, + req.Email, + req.Name, + req.Status, + req.Attribs, + req.Lists) + + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Update failed: %v", pqErrMsg(err))) + } + + return handleGetSubscriber(c) +} + +// handleDeleteSubscribers handles subscriber deletion, +// either a single one (ID in the URI), or a list. +func handleDeleteSubscribers(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.ParseInt(c.Param("id"), 10, 64) + ids pq.Int64Array + ) + + // Read the list IDs if they were sent in the body. + c.Bind(&ids) + if id < 1 && len(ids) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + if id > 0 { + ids = append(ids, id) + } + + if _, err := app.Queries.DeleteSubscribers.Exec(ids); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Delete failed: %v", err)) + } + + return c.JSON(http.StatusOK, okResp{true}) +} + +// handleQuerySubscribersIntoLists handles querying subscribers based on arbitrary conditions in SQL +// and adding them to given lists. +func handleQuerySubscribersIntoLists(c echo.Context) error { + var ( + app = c.Get("app").(*App) + req queryAddReq + ) + + // Get and validate fields. + if err := c.Bind(&req); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Error parsing request: %v", err)) + } + + if len(req.TargetLists) < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid `target_lists`.") + } + + if req.SourceList < 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid `source_list`.") + } + + if req.Query == "" { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid subscriber `query`.") + } + cond := " AND " + req.Query + + // The SQL queries to be executed are different for global subscribers + // and subscribers belonging to a specific list. + var ( + stmt = "" + stmtDry = "" + ) + if req.SourceList > 0 { + stmt = fmt.Sprintf(app.Queries.QuerySubscribersByList, req.SourceList, cond) + stmtDry = fmt.Sprintf(app.Queries.QuerySubscribersByList, req.SourceList, cond, 0, 1) + } else { + stmt = fmt.Sprintf(app.Queries.QuerySubscribersIntoLists, cond) + stmtDry = fmt.Sprintf(app.Queries.QuerySubscribers, cond, 0, 1) + } + + // Create a readonly transaction to prevent mutations. + // This is used to dry-run the arbitrary query before it's used to + // insert subscriptions. + tx, err := app.DB.BeginTxx(context.Background(), &sql.TxOptions{ReadOnly: true}) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error preparing query (dry-run): %v", pqErrMsg(err))) + } + + // Perform the dry run. + if _, err := tx.Exec(stmtDry); err != nil { + tx.Rollback() + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error querying (dry-run) subscribers: %v", pqErrMsg(err))) + } + if err := tx.Commit(); err != nil { + tx.Rollback() + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error in subscriber dry-run query transaction: %v", pqErrMsg(err))) + } + + // Prepare the query. + q, err := app.DB.Preparex(stmt) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error preparing query: %v", pqErrMsg(err))) + } + + // Run the query. + res, err := q.Exec(req.TargetLists) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error adding subscribers to lists: %v", pqErrMsg(err))) + } + + num, _ := res.RowsAffected() + return c.JSON(http.StatusOK, okResp{queryAddResp{num}}) +} diff --git a/templates.go b/templates.go new file mode 100644 index 0000000..8aca942 --- /dev/null +++ b/templates.go @@ -0,0 +1,226 @@ +package main + +import ( + "bytes" + "errors" + "fmt" + "net/http" + "strconv" + "strings" + + "github.com/asaskevich/govalidator" + "github.com/knadh/listmonk/models" + "github.com/knadh/listmonk/runner" + "github.com/labstack/echo" +) + +const dummyTpl = ` +

Hi there

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis et elit ac elit sollicitudin condimentum non a magna. Sed tempor mauris in facilisis vehicula. Aenean nisl urna, accumsan ac tincidunt vitae, interdum cursus massa. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aliquam varius turpis et turpis lacinia placerat. Aenean id ligula a orci lacinia blandit at eu felis. Phasellus vel lobortis lacus. Suspendisse leo elit, luctus sed erat ut, venenatis fermentum ipsum. Donec bibendum neque quis.

+ +

Sub heading

+

Nam luctus dui non placerat mattis. Morbi non accumsan orci, vel interdum urna. Duis faucibus id nunc ut euismod. Curabitur et eros id erat feugiat fringilla in eget neque. Aliquam accumsan cursus eros sed faucibus.

+ +

Here is a link to listmonk.

+` + +type dummyMessage struct { + UnsubscribeURL string +} + +// handleGetTemplates handles retrieval of templates. +func handleGetTemplates(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out []models.Template + + id, _ = strconv.Atoi(c.Param("id")) + single = false + noBody, _ = strconv.ParseBool(c.QueryParam("no_body")) + ) + + // Fetch one list. + if id > 0 { + single = true + } + + err := app.Queries.GetTemplates.Select(&out, id, noBody) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching templates: %s", pqErrMsg(err))) + } else if single && len(out) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Template not found.") + } else if len(out) == 0 { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + if single { + return c.JSON(http.StatusOK, okResp{out[0]}) + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handlePreviewTemplate renders the HTML preview of a template. +func handlePreviewTemplate(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + tpls []models.Template + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + err := app.Queries.GetTemplates.Select(&tpls, id, false) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching templates: %s", pqErrMsg(err))) + } + + if len(tpls) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Template not found.") + } + t := tpls[0] + + // Compile the template. + tpl, err := runner.CompileMessageTemplate(t.Body, dummyTpl) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Error compiling template: %v", err)) + } + + // Render the message body. + var out = bytes.Buffer{} + if err := tpl.ExecuteTemplate(&out, + runner.BaseTPL, + dummyMessage{UnsubscribeURL: "#dummy"}); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Error executing template: %v", err)) + } + + return c.HTML(http.StatusOK, out.String()) +} + +// handleCreateTemplate handles template creation. +func handleCreateTemplate(c echo.Context) error { + var ( + app = c.Get("app").(*App) + o = models.Template{} + ) + + if err := c.Bind(&o); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + + if err := validateTemplate(o); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, err.Error()) + } + + // Insert and read ID. + var newID int + if err := app.Queries.CreateTemplate.Get(&newID, + o.Name, + o.Body); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error template user: %v", pqErrMsg(err))) + } + + // Hand over to the GET handler to return the last insertion. + c.SetParamNames("id") + c.SetParamValues(fmt.Sprintf("%d", newID)) + return c.JSON(http.StatusOK, handleGetLists(c)) +} + +// handleUpdateTemplate handles template modification. +func handleUpdateTemplate(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + var o models.Template + if err := c.Bind(&o); err != nil { + return err + } + + if err := validateTemplate(o); err != nil { + return echo.NewHTTPError(http.StatusBadRequest, err.Error()) + } + + // TODO: PASSWORD HASHING. + res, err := app.Queries.UpdateTemplate.Exec(o.ID, o.Name, o.Body) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error updating template: %s", pqErrMsg(err))) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "Template not found.") + } + + return handleGetTemplates(c) +} + +// handleTemplateSetDefault handles template modification. +func handleTemplateSetDefault(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + _, err := app.Queries.SetDefaultTemplate.Exec(id) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error updating template: %s", pqErrMsg(err))) + } + + return handleGetTemplates(c) +} + +// handleDeleteTemplate handles template deletion. +func handleDeleteTemplate(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } else if id == 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Cannot delete the primordial template.") + } + + res, err := app.Queries.DeleteTemplate.Exec(id) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Error deleting template: %v", err)) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, + "Cannot delete the last, default, or non-existent template.") + } + + return c.JSON(http.StatusOK, okResp{true}) +} + +// validateTemplate validates template fields. +func validateTemplate(o models.Template) error { + if !govalidator.IsByteLength(o.Name, 1, stdInputMaxLen) { + return errors.New("invalid length for `name`") + } + + if !strings.Contains(o.Body, `{{ template "content" . }}`) { + return errors.New(`template body should contain the {{ template "content" . }} placeholder`) + } + + return nil +} diff --git a/users.go b/users.go new file mode 100644 index 0000000..8978e1a --- /dev/null +++ b/users.go @@ -0,0 +1,138 @@ +package main + +import ( + "errors" + "fmt" + "net/http" + "strconv" + + "github.com/asaskevich/govalidator" + "github.com/knadh/listmonk/models" + "github.com/labstack/echo" +) + +// handleGetUsers handles retrieval of users. +func handleGetUsers(c echo.Context) error { + var ( + app = c.Get("app").(*App) + out []models.User + + id, _ = strconv.Atoi(c.Param("id")) + single = false + ) + + // Fetch one list. + if id > 0 { + single = true + } + + err := app.Queries.GetUsers.Select(&out, id) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error fetching users: %s", pqErrMsg(err))) + } else if single && len(out) == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "User not found.") + } else if len(out) == 0 { + return c.JSON(http.StatusOK, okResp{[]struct{}{}}) + } + + if single { + return c.JSON(http.StatusOK, okResp{out[0]}) + } + + return c.JSON(http.StatusOK, okResp{out}) +} + +// handleCreateUser handles user creation. +func handleCreateUser(c echo.Context) error { + var ( + app = c.Get("app").(*App) + o = models.User{} + ) + + if err := c.Bind(&o); err != nil { + return err + } + + if !govalidator.IsEmail(o.Email) { + return errors.New("invalid `email`") + } + if !govalidator.IsByteLength(o.Name, 1, stdInputMaxLen) { + return errors.New("invalid length for `name`") + } + + // Insert and read ID. + var newID int + if err := app.Queries.CreateUser.Get(&newID, + o.Email, + o.Name, + o.Password, + o.Type, + o.Status); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error creating user: %v", pqErrMsg(err))) + } + + // Hand over to the GET handler to return the last insertion. + c.SetParamNames("id") + c.SetParamValues(fmt.Sprintf("%d", newID)) + return c.JSON(http.StatusOK, handleGetLists(c)) +} + +// handleUpdateUser handles user modification. +func handleUpdateUser(c echo.Context) error { + var ( + app = c.Get("app").(*App) + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } else if id == 1 { + return echo.NewHTTPError(http.StatusBadRequest, + "The primordial super admin cannot be deleted.") + } + + var o models.User + if err := c.Bind(&o); err != nil { + return err + } + + if !govalidator.IsEmail(o.Email) { + return errors.New("invalid `email`") + } + if !govalidator.IsByteLength(o.Name, 1, stdInputMaxLen) { + return errors.New("invalid length for `name`") + } + + // TODO: PASSWORD HASHING. + res, err := app.Queries.UpdateUser.Exec(o.ID, + o.Email, + o.Name, + o.Password, + o.Type, + o.Status) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error updating user: %s", pqErrMsg(err))) + } + + if n, _ := res.RowsAffected(); n == 0 { + return echo.NewHTTPError(http.StatusBadRequest, "User not found.") + } + + return handleGetUsers(c) +} + +// handleDeleteUser handles user deletion. +func handleDeleteUser(c echo.Context) error { + var ( + id, _ = strconv.Atoi(c.Param("id")) + ) + + if id < 1 { + return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.") + } + + return c.JSON(http.StatusOK, okResp{true}) +} diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..3031a81 --- /dev/null +++ b/utils.go @@ -0,0 +1,247 @@ +package main + +import ( + "bytes" + "crypto/rand" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + + "github.com/jmoiron/sqlx" + "github.com/knadh/goyesql" + "github.com/labstack/echo" + "github.com/lib/pq" +) + +const tmpFilePrefix = "listmonk" + +var ( + // This matches filenames, sans extensions, of the format + // filename_(number). The number is incremented in case + // new file uploads conflict with existing filenames + // on the filesystem. + fnameRegexp, _ = regexp.Compile(`(.+?)_([0-9]+)$`) + + // This replaces all special characters + tagRegexp, _ = regexp.Compile(`[^a-z0-9\-\s]`) + tagRegexpSpaces, _ = regexp.Compile(`[\s]+`) +) + +// ScanToStruct prepares a given set of Queries and assigns the resulting +// *sql.Stmt statements to the fields of a given struct, matching based on the name +// in the `query` tag in the struct field names. +func scanQueriesToStruct(obj interface{}, q goyesql.Queries, db *sqlx.DB) error { + ob := reflect.ValueOf(obj) + if ob.Kind() == reflect.Ptr { + ob = ob.Elem() + } + + if ob.Kind() != reflect.Struct { + return fmt.Errorf("Failed to apply SQL statements to struct. Non struct type: %T", ob) + } + + // Go through every field in the struct and look for it in the Args map. + for i := 0; i < ob.NumField(); i++ { + f := ob.Field(i) + + if f.IsValid() { + if tag := ob.Type().Field(i).Tag.Get("query"); tag != "" && tag != "-" { + // Extract the value of the `query` tag. + var ( + tg = strings.Split(tag, ",") + name string + ) + if len(tg) == 2 { + if tg[0] != "-" && tg[0] != "" { + name = tg[0] + } + } else { + name = tg[0] + } + + // Query name found in the field tag is not in the map. + if _, ok := q[name]; !ok { + return fmt.Errorf("query '%s' not found in query map", name) + } + + if !f.CanSet() { + return fmt.Errorf("query field '%s' is unexported", ob.Type().Field(i).Name) + } + + switch f.Type().String() { + case "string": + // Unprepared SQL query. + f.Set(reflect.ValueOf(q[name].Query)) + case "*sqlx.Stmt": + // Prepared query. + stmt, err := db.Preparex(q[name].Query) + if err != nil { + return fmt.Errorf("Error preparing query '%s': %v", name, err) + } + + f.Set(reflect.ValueOf(stmt)) + } + } + } + } + + return nil +} + +// uploadFile is a helper function on top of echo.Context for processing file uploads. +// It allows copying a single file given the incoming file field name. +// If the upload directory dir is empty, the file is copied to the system's temp directory. +// If name is empty, the incoming file's name along with a small random hash is used. +// When a slice of MIME types is given, the uploaded file's MIME type is validated against the list. +func uploadFile(key string, dir, name string, mimes []string, c echo.Context) (string, error) { + file, err := c.FormFile(key) + if err != nil { + return "", echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Invalid file uploaded: %v", err)) + } + + // Check MIME type. + if len(mimes) > 0 { + var ( + typ = file.Header.Get("Content-type") + ok = false + ) + for _, m := range mimes { + if typ == m { + ok = true + break + } + } + + if !ok { + return "", echo.NewHTTPError(http.StatusBadRequest, + fmt.Sprintf("Unsupported file type (%s) uploaded.", typ)) + } + } + + src, err := file.Open() + if err != nil { + return "", err + } + defer src.Close() + + // There's no upload directory. Use a tempfile. + var out *os.File + if dir == "" { + o, err := ioutil.TempFile("", tmpFilePrefix) + if err != nil { + return "", echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error copying uploaded file: %v", err)) + } + out = o + name = o.Name() + } else { + // There's no explicit name. Use the one posted in the HTTP request. + if name == "" { + name = strings.TrimSpace(file.Filename) + if name == "" { + name, _ = generateRandomString(10) + } + } + name = assertUniqueFilename(dir, name) + + o, err := os.OpenFile(filepath.Join(dir, name), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0664) + if err != nil { + return "", echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error copying uploaded file: %v", err)) + } + + out = o + } + defer out.Close() + + if _, err = io.Copy(out, src); err != nil { + return "", echo.NewHTTPError(http.StatusInternalServerError, + fmt.Sprintf("Error copying uploaded file: %v", err)) + } + + return name, nil +} + +// Given an error, pqErrMsg will try to return pq error details +// if it's a pq error. +func pqErrMsg(err error) string { + if err, ok := err.(*pq.Error); ok { + if err.Detail != "" { + return fmt.Sprintf("%s. %s", err, err.Detail) + } + } + + return err.Error() +} + +// generateRandomString generates a cryptographically random, alphanumeric string of length n. +func generateRandomString(n int) (string, error) { + const dictionary = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + + var bytes = make([]byte, n) + if _, err := rand.Read(bytes); err != nil { + return "", err + } + + for k, v := range bytes { + bytes[k] = dictionary[v%byte(len(dictionary))] + } + + return string(bytes), nil +} + +// assertUniqueFilename takes a file path and check if it exists on the disk. If it doesn't, +// it returns the same name and if it does, it adds a small random hash to the filename +// and returns that. +func assertUniqueFilename(dir, fileName string) string { + var ( + ext = filepath.Ext(fileName) + base = fileName[0 : len(fileName)-len(ext)] + num = 0 + ) + + for { + // There's no name conflict. + if _, err := os.Stat(filepath.Join(dir, fileName)); os.IsNotExist(err) { + return fileName + } + + // Does the name match the _(num) syntax? + r := fnameRegexp.FindAllStringSubmatch(fileName, -1) + if len(r) == 1 && len(r[0]) == 3 { + num, _ = strconv.Atoi(r[0][2]) + } + num++ + + fileName = fmt.Sprintf("%s_%d%s", base, num, ext) + } +} + +// normalizeTags takes a list of string tags and normalizes them by +// lowercasing and removing all special characters except for dashes. +func normalizeTags(tags []string) []string { + var ( + out []string + space = []byte(" ") + dash = []byte("-") + ) + + for _, t := range tags { + rep := bytes.TrimSpace(tagRegexp.ReplaceAll(bytes.ToLower([]byte(t)), space)) + rep = tagRegexpSpaces.ReplaceAll(rep, dash) + + if len(rep) > 0 { + out = append(out, string(rep)) + } + } + + return out +}