Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/themeisle-content-forms.tar

class-themeisle-content-forms-server.php000066600000010061151156027310014442 0ustar00<?php

namespace ThemeIsle\ContentForms;

/**
 * Class RestServer
 *
 */
class RestServer extends \WP_Rest_Controller {

	/**
	 * @var RestServer
	 */
	public static $instance = null;

	public $namespace = 'content-forms/';
	public $version = 'v1';

	public function init() {
		add_action( 'rest_api_init', array( $this, 'register_routes' ) );
	}

	public function register_routes() {
		$namespace = $this->namespace . $this->version;

		register_rest_route( $namespace, '/check', array(
			array(
				'methods'  => \WP_REST_Server::READABLE,
				'callback' => array( $this, 'rest_check' )
			),
		) );

		register_rest_route( $namespace, '/submit', array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => array( $this, 'submit_form' ),
				'permission_callback' => array( $this, 'submit_forms_permissions_check' ),
				'args'                => array(
					'form_type' => array(
						'type'        => 'string',
						'required'    => true,
						'description' => __( 'What type of form is submitted.', 'themeisle-companion' ),
					),
					'nonce'     => array(
						'type'        => 'string',
						'required'    => true,
						'description' => __( 'The security key', 'themeisle-companion' ),
					),
					'data'      => array(
						'type'        => 'json',
						'required'    => true,
						'description' => __( 'The form must have data', 'themeisle-companion' ),
					),
					'form_id'   => array(
						'type'        => 'string',
						'required'    => true,
						'description' => __( 'The form identifier.', 'themeisle-companion' ),
					),
					'post_id'   => array(
						'type'        => 'string',
						'required'    => true,
						'description' => __( 'The form identifier.', 'themeisle-companion' ),
					)
				),
			),
		) );
	}

	public function rest_check( \WP_REST_Request $request ) {
			return rest_ensure_response( 'success' );
	}

	/**
	 * @param \WP_REST_Request $request
	 *
	 * @return mixed|\WP_REST_Response
	 */
	public function submit_form( $request ) {
		$return = array(
			'success' => false,
			'msg'     => esc_html__( 'Something went wrong', 'themeisle-companion' )
		);

		$nonce   = $request->get_param( 'nonce' );
		$form_id = $request->get_param( 'form_id' );
		$post_id = $request->get_param( 'post_id' );

		if ( ! wp_verify_nonce( $nonce, 'content-form-' . $form_id ) ) {
			$return['msg'] = 'Invalid nonce';
			return rest_ensure_response( $return );
		}

		$form_type    = $request->get_param( 'form_type' );
		$form_builder = $request->get_param( 'form_builder' );
		$data         = $request->get_param( 'data' );

		if ( empty( $data[ $form_id ] ) ) {
			$return['msg'] = esc_html__( 'Invalid Data ', 'themeisle-companion' ) . $form_id;
			return $return;
		}

		$data = $data[ $form_id ];

		/**
		 * Each form type should be able to provide its own process of submitting data.
		 * Must return the success status and a message.
		 */
		$return = apply_filters( 'content_forms_submit_' . $form_type, $return, $data, $form_id, $post_id, $form_builder );

		return rest_ensure_response( $return );
	}

	public function submit_forms_permissions_check() {
		return 1;
	}

	/**
	 * @static
	 * @since 1.0.0
	 * @access public
	 * @return RestServer
	 */
	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
			self::$instance->init();
		}

		return self::$instance;
	}

	/**
	 * Throw error on object clone
	 *
	 * The whole idea of the singleton design pattern is that there is a single
	 * object therefore, we don't want the object to be cloned.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __clone() {
		// Cloning instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}

	/**
	 * Disable unserializing of the class
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __wakeup() {
		// Unserializing instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}
}class-content-form-base.php000066600000015003151156027310011707 0ustar00<?php

namespace ThemeIsle\ContentForms;

/**
 * An abstract class which should reflect how a Content Form should look like
 * Class ContentFormBase
 * @package ThemeIsle\ContentForms
 */
abstract class ContentFormBase {

	/**
	 * The content form type.
	 * Currently the possible values are: `contact`,`newsletter` and `registration`
	 * @var string $type
	 */
	private $type;

	/**
	 * Holds the shape of the content form, names, details and fields structure.
	 * @var array $config
	 */
	private $config;

	protected $notices = array();

	/**
	 * Create the Content Form Object and add initial hooks
	 * ContentFormBase constructor.
	 */
	function __construct() {
		$this->init();

		$this->add_base_hooks();
	}

	/**
	 * This method is passed to the rest controller and it is responsible for submitting the data.
	 *
	 * @param $return array
	 * @param $data array
	 * @param $widget_id string
	 * @param $post_id string
	 * @param $builder string
	 *
	 * @return mixed
	 */
	abstract public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder );

	/**
	 * Create an abstract array config which should define the form.
	 * This method's body will be passed to a filter
	 *
	 * @param $config
	 *
	 * @return mixed
	 */
	abstract public function make_form_config( $config );

	/**
	 * Map the registration actions
	 */
	public function add_base_hooks() {

		// add the initial config for the Contact Content Form
		add_filter( 'content_forms_config_for_' . $this->get_type(), array( $this, 'make_form_config' ) );

		$config = apply_filters( 'content_forms_config_for_' . $this->get_type(), array() );
		$this->set_config( $config );

		// @TODO if we will ever think about letting users submit without AJAX
		// register the classic submission action
		//add_action( 'admin_post_nopriv_content_form_contact_submit', array( $this, 'submit_form' ) );
		//add_action( 'admin_post_content_form_contact_submit', array( $this, 'submit_form' ) );

		// add a rest api callback for the `submit` route
		add_filter( 'content_forms_submit_' . $this->get_type(), array( $this, 'rest_submit_form' ), 10, 5 );

		$this->maybe_register_elementor_category();

		// Register the Elementor Widget
		add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_elementor_widget' ) );

		// Register the Beaver Module
		$this->register_beaver_module();
		add_action( 'init', array( $this, 'register_beaver_module' ) );

		// Register the Gutenberg Block
		// @TODO This is not fully working at this moment
		// $this->register_gutenberg_block();
	}

	/**
	 * Elementor widget registration
	 */
	public function register_elementor_widget() {

		// We check if the Elementor plugin has been installed / activated.
		if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {

			\Elementor\Plugin::instance()->widgets_manager->register_widget_type(
				new \ThemeIsle\ContentForms\ElementorWidget(
					array(
						'id'                   => 'content_form_' . $this->get_type(),
						'content_forms_config' => $this->get_config()
					),
					array(
						'content_forms_config' => $this->get_config()
					)
				)
			);
		}
	}

	/**
	 * Register a Beaver module
	 * https://www.wpbeaverbuilder.com/custom-module-documentation
	 */
	public function register_beaver_module() {
		if ( class_exists( '\FLBuilderModel' ) ) {

			$classname = __NAMESPACE__ . '\\BeaverModule' . ucfirst( $this->get_type() );

			$module = new $classname(
				array(
					'id'                   => 'content_form_' . $this->get_type(),
					'type'                 => $this->get_type(),
					'content_forms_config' => $this->get_config()
				)
			);

			$module->register_widget();
		}
	}

	/**
	 * Gutenberg block registration
	 */
	public function register_gutenberg_block() {

		if ( in_array( 'gutenberg/gutenberg.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
			require_once( __DIR__ . '/class-themeisle-content-forms-gutenberg.php' );

			$block = new \ThemeIsle\ContentForms\GutenbergModule(
				array(
					'id'                   => 'content_form_' . $this->get_type(),
					'type'                 => $this->get_type(),
					'content_forms_config' => $this->get_config()
				)
			);
		}
	}

	/**
	 * Themeisle Companion may register an Elementor widgets category.
	 * But if not, we need to register it ourselfs.
	 */
	public function maybe_register_elementor_category() {

		if ( ! defined( 'ELEMENTOR_PATH' ) || ! class_exists( 'Elementor\Widget_Base' ) ) {
			return;
		}

		$categories = \Elementor\Plugin::instance()->elements_manager->get_categories();

		if ( ! isset( $categories['obfx-elementor-widgets'] ) ) {

			$category_args = apply_filters( 'content_forms_category_args', array(
				'slug' => 'obfx-elementor-widgets',
				'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
				'icon'  => 'fa fa-plug',
			) );

			\Elementor\Plugin::instance()->elements_manager->add_category(
				$category_args['slug'],
				array(
					'title' => $category_args['title'],
					'icon'  => $category_args['slug'],
				),
				1
			);
		}
	}

	/**
	 * Get block settings depending on what builder is in use.
	 *
	 * @param $widget_id
	 * @param $post_id
	 * @param $builder
	 *
	 * @return bool
	 */
	protected function get_widget_settings( $widget_id, $post_id, $builder ) {
		if ( 'elementor' === $builder ) {
			$settings = ElementorWidget::get_widget_settings( $widget_id, $post_id );

			return $settings['settings'];
		} elseif ( 'beaver' === $builder ) {
			return $this->get_beaver_module_settings_by_id( $widget_id, $post_id );
		}

		// if gutenberg
		return false;
	}

	/**
	 * Each beaver module has data saved in the post metadata, and we need to extract it by its id.
	 *
	 * @param $node_id
	 * @param $post_id
	 *
	 * @return array|bool
	 */
	private function get_beaver_module_settings_by_id( $node_id, $post_id ) {
		$post_data = \FLBuilderModel::get_layout_data( null, $post_id );

		if ( isset( $post_data[ $node_id ] ) ) {
			$module = $post_data[ $node_id ];

			return (array) $module->settings;
		}

		return false;
	}

	/**
	 * Setter method for the form type
	 *
	 * @param $type
	 */
	protected function set_type( $type ) {
		$this->type = $type;
	}

	/**
	 * Getter method for the form type
	 *
	 * @return string
	 */
	final public function get_type() {
		return $this->type;
	}

	/**
	 * Setter method for the config property
	 *
	 * @param $config
	 */
	protected function set_config( $config ) {
		$this->config = $config;
	}

	/**
	 * Getter method for the config property
	 * @return mixed
	 */
	final public function get_config() {
		return $this->config;
	}

}load.php000066600000006714151156027310006211 0ustar00<?php
/**
 * Loader for the ThemeIsle\ContentForms feature
 *
 * @package     ThemeIsle\ContentForms
 * @copyright   Copyright (c) 2017, Andrei Lupu
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       1.0.0
 */

if ( ! function_exists( 'themeisle_content_forms_load' ) ) :

	/**
	 * Load the necessary resource for this library
	 */
	function themeisle_content_forms_load() {
		$path = dirname( __FILE__ );

		// @TODO we should autoload these
		// get base classes
		require_once $path . '/class-content-form-base.php';
		require_once $path . '/class-themeisle-content-forms-server.php';

		\Themeisle\ContentForms\RestServer::instance();

		if ( defined( 'ELEMENTOR_PATH' ) && class_exists( 'Elementor\Widget_Base' ) ) {
			// get builders generators
			require_once $path . '/class-themeisle-content-forms-elementor.php';
		}

		if ( class_exists( '\FLBuilderModel' ) ) {
			require_once $path . '/beaver/class-themeisle-content-forms-beaver-base.php';
			require_once $path . '/beaver/class-themeisle-content-forms-beaver-contact.php';
			require_once $path . '/beaver/class-themeisle-content-forms-beaver-newsletter.php';
			require_once $path . '/beaver/class-themeisle-content-forms-beaver-registration.php';
		}

		// @TODO Gutenberg is not working yet
		//require_once $path . '/class-themeisle-content-forms-gutenberg.php';

		// get forms
		require_once $path . '/class-themeisle-content-forms-contact.php';
		require_once $path . '/class-themeisle-content-forms-newsletter.php';
		require_once $path . '/class-themeisle-content-forms-registration.php';

		/**
		 * At this point all the PHP classes are available and the forms can be loaded
		 */
		do_action( 'init_themeisle_content_forms' );

		// Register CSS & JS assets + localizations
		add_action( 'wp_enqueue_scripts', 'themeisle_content_forms_register_public_assets' );
	}
endif;

if ( ! function_exists( 'themeisle_content_forms_register_public_assets' ) ) :
	/**
	 * Register the library assets, they will be enqueue later by builders.
	 * Also, localize REST params
	 */
	function themeisle_content_forms_register_public_assets() {
		$version = null; // a null version will go for a WordPress core version

		$package = json_decode( file_get_contents( dirname( __FILE__ ) . '/composer.json' ) );

		if ( isset( $package->version ) ) {
			$version = $package->version;
		}

		wp_register_script( 'content-forms', plugins_url( '/assets/content-forms.js', __FILE__ ), array( 'jquery' ), $version );

		wp_localize_script( 'content-forms', 'contentFormsSettings', array(
			'restUrl' => esc_url_raw( rest_url() . 'content-forms/v1/' ),
			'nonce'   => wp_create_nonce( 'wp_rest' ),
		) );

		/**
		 * Use this filter to force the js loading on all pages.
		 * Otherwise, it will be loaded only if a content form is present
		 */
		if ( apply_filters( 'themeisle_content_forms_force_js_enqueue', false ) ) {
			wp_enqueue_script( 'content-forms' );
		}

		/**
		 * Every theme with a better form style can disable the default content forms styles by returning a false
		 * to this filter `themeisle_content_forms_register_default_style`.
		 */
		if ( true === apply_filters( 'themeisle_content_forms_register_default_style', true ) ) {
			wp_register_style( 'content-forms', plugins_url( '/assets/content-forms.css', __FILE__ ), array(), $version );
		}
	}
endif;

// Run the show only for PHP 5.3 or highier
if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
	add_action( 'init', 'themeisle_content_forms_load', 9 );
}class-themeisle-content-forms-contact.php000066600000020363151156027310014575 0ustar00<?php

namespace ThemeIsle\ContentForms;

use ThemeIsle\ContentForms\ContentFormBase as Base;

/**
 * This class creates a Contact Form
 * Class ContactForm
 * @package ThemeIsle\ContentForms
 */
class ContactForm extends Base {

	/**
	 * @var ContactForm
	 */
	public static $instance = null;

	/**
	 * The Call To Action
	 */
	public function init() {
		$this->set_type( 'contact' );

		$this->notices = array(
			'success' => esc_html__( 'Your message has been sent!', 'themeisle-companion' ),
			'error'   => esc_html__( 'We failed to send your message!', 'themeisle-companion' ),
		);

	}

	/**
	 * Create an abstract array config which should define the form.
	 *
	 * @param $config
	 *
	 * @return array
	 */
	function make_form_config( $config ) {
		return array(
			'id'                           => 'contact',
			'icon'                         => 'eicon-align-left',
			'title'                        => esc_html__( 'Contact Form', 'themeisle-companion' ),
			'fields' /* or form_fields? */ => array(
				'name'    => array(
					'type'        => 'text',
					'label'       => esc_html__( 'Name', 'themeisle-companion' ),
					'default'     => esc_html__( 'Name', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Your Name', 'themeisle-companion' ),
					'require'     => 'required'
				),
				'email'   => array(
					'type'        => 'email',
					'label'       => esc_html__( 'Email', 'themeisle-companion' ),
					'default'     => esc_html__( 'Email', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Email address', 'themeisle-companion' ),
					'require'     => 'required'
				),
				'phone'   => array(
					'type'        => 'number',
					'label'       => esc_html__( 'Phone', 'themeisle-companion' ),
					'default'     => esc_html__( 'Phone', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Phone Nr', 'themeisle-companion' ),
					'require'     => 'optional'
				),
				'message' => array(
					'type'        => 'textarea',
					'label'       => esc_html__( 'Message', 'themeisle-companion' ),
					'default'     => esc_html__( 'Message', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Your message', 'themeisle-companion' ),
					'require'     => 'required'
				)
			),

			'controls' /* or settings? */ => array(
				'to_send_email' => array(
					'type'        => 'text',
					'label'       => esc_html__( 'Send to', 'themeisle-companion' ),
					'description' => esc_html__( 'Where should we send the email?', 'themeisle-companion' ),
					'default'     => get_bloginfo( 'admin_email' )
				),
				'submit_label'  => array(
					'type'        => 'text',
					'label'       => esc_html__( 'Submit', 'themeisle-companion' ),
					'default'     => esc_html__( 'Submit', 'themeisle-companion' ),
					'description' => esc_html__( 'The Call To Action label', 'themeisle-companion' )
				)
			)
		);
	}

	/**
	 * This method is passed to the rest controller and it is responsible for submitting the data.
	 * // @TODO we still have to check for the requirement with the field settings
	 *
	 * @param $return array
	 * @param $data array Must contain the following keys: `email`, `name`, `message` but it can also have extra keys
	 * @param $widget_id string
	 * @param $post_id string
	 * @param $builder string
	 *
	 * @return mixed
	 */
	public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {

		if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
			$return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );

			return $return;
		}

		$from = $data['email'];

		if ( empty( $data['name'] ) ) {
			$return['msg'] = esc_html__( 'Missing name.', 'themeisle-companion' );

			return $return;
		}

		$name = $data['name'];

		if ( empty( $data['message'] ) ) {
			$return['msg'] = esc_html__( 'Missing message.', 'themeisle-companion' );

			return $return;
		}

		$msg = $data['message'];

		// prepare settings for submit
		$settings = $this->get_widget_settings( $widget_id, $post_id, $builder );

		if ( ! isset( $settings['to_send_email'] ) || ! is_email( $settings['to_send_email'] ) ) {
			$return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'themeisle-companion' );

			return $return;
		}

		$result = $this->_send_mail( $settings['to_send_email'], $from, $name, $msg, $data );

		if ( $result ) {
			$return['success'] = true;
			$return['msg']     = $this->notices['success'];
		} else {
			$return['msg'] = esc_html__( 'Ops! I cannot send this email!', 'themeisle-companion' );
		}

		return $return;
	}

	/**
	 * Mail sender method
	 *
	 * @param $mailto
	 * @param $mailfrom
	 * @param $subject
	 * @param $body
	 * @param array $extra_data
	 *
	 * @return bool
	 */
	private function _send_mail( $mailto, $mailfrom, $name, $body, $extra_data = array() ) {
		$success = false;

		$name = sanitize_text_field( $name );
		$subject  = 'Website inquiry from ' . $name;
		$mailto   = sanitize_email( $mailto );
		$mailfrom = sanitize_email( $mailfrom );

		$headers   = array();
		// use admin email assuming the Server is allowed to send as admin email
		$headers[] = 'From: Admin <' . get_option( 'admin_email' ) . '>';
		$headers[] = 'Reply-To: ' . $name . ' <' . $mailfrom . '>';
		$headers[] = 'Content-Type: text/html; charset=UTF-8';

		$body = $this->prepare_body( $body, $extra_data );

		ob_start();

		$success = wp_mail( $mailto, $subject, $body, $headers );

		if ( ! $success ) {
			return ob_get_clean();
		}

		return $success;
	}

	/**
	 * Body template preparation
	 *
	 * @param string $body
	 * @param array $data
	 *
	 * @return string
	 */
	private function prepare_body( $body, $data ) {
		$tmpl = "";

		ob_start(); ?>
		<!doctype html>
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<meta http-equiv="Content-Type" content="text/html;" charset="utf-8"/>
			<!-- view port meta tag -->
			<meta name="viewport" content="width=device-width, initial-scale=1">
			<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
			<title><?php echo esc_html__( 'Mail From: ', 'themeisle-companion' ) . esc_html( $data['name'] ); ?></title>
		</head>
		<body>
		<table>
			<thead>
			<tr>
				<th>
					<h3>
						<?php esc_html_e( 'Content Form submission from ', 'themeisle-companion' ); ?>
						<a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
					</h3>
					<hr/>
				</th>
			</tr>
			</thead>
			<tbody>
			<?php
			foreach ( $data as $key => $value ) { ?>
				<tr>
					<td>
						<strong><?php echo esc_html( $key ) ?> : </strong>
						<p><?php echo esc_html( $value ); ?></p>
					</td>
				</tr>
			<?php } ?>
			</tbody>
			<tfoot>
			<tr>
				<td>
					<hr/>
					<?php esc_html_e( 'You recieved this email because your email address is set in the content form settings on ', 'themeisle-companion' ) ?>
					<a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
				</td>
			</tr>
			</tfoot>
		</table>
		</body>
		</html>
		<?php
		return ob_get_clean();
	}

	/**
	 * The classic submission method via the `admin_post_` hook
	 * @TODO not used at this moment.
	 */
	function submit_form() {
		// @TODO first we need to collect data from $_POST and validate our parameters
		//$ok = $this->_send_mail( $to, $subj );
		// @TODO we need to inform the user if the mail was sent or not;

		if ( ! wp_get_referer() ) {
			return;
		}

		wp_safe_redirect( wp_get_referer() );
		exit;
	}

	/**
	 * @static
	 * @since 1.0.0
	 * @access public
	 * @return ContactForm
	 */
	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
			self::$instance->init();
		}

		return self::$instance;
	}

	/**
	 * Throw error on object clone
	 *
	 * The whole idea of the singleton design pattern is that there is a single
	 * object therefore, we don't want the object to be cloned.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __clone() {
		// Cloning instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}

	/**
	 * Disable unserializing of the class
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __wakeup() {
		// Unserializing instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}
}
assets/content-forms.css000066600000002245151156027310011366 0ustar00label {
    display: block;
    margin-top: 20px;
}
input, textarea {
    width: 100%;
    display: block;
    border: 1px solid #cccccc;
    border-radius: 3px;
}
fieldset {
    border: none;
    margin: 0;
}
.content-form-loading {
    opacity: .5;
    pointer-events: none;
}
.content-form-notice {
    font-size: 21px;
    padding: 5px;
}
.content-form-success {
    color: #53a813;
    border: 2px solid #53a813;
}
.content-form-error {
    color: #d5521a;
    border: 2px solid #d5521a;
}

.content-form {
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

.content-form .submit-form {
    width: 100%;
}

.form-control {
    height: auto;
}

.content-form-newsletter {
    align-items: flex-end;
}

.newsletter button {
    margin: 0;
}

.content-form-newsletter fieldset {
    margin-bottom: 0;
    padding-bottom: 0;
}

.content-form-newsletter > .form-group .form-control {
    margin-bottom: 0;

}
.content-form-newsletter .elementor-column:not(.elementor-col-100) + .submit-form {
    display: flex; width: auto;
}assets/content-forms.js000066600000016477151156027310011226 0ustar00/*!
SerializeJSON jQuery plugin.
https://github.com/marioizquierdo/jquery.serializeJSON
version 2.8.1 (Dec, 2016)

Copyright (c) 2012, 2017 Mario Izquierdo
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*/
!function(a){if("function"==typeof define&&define.amd)define(["jquery"],a);else if("object"==typeof exports){var b=require("jquery");module.exports=a(b)}else a(window.jQuery||window.Zepto||window.$)}(function(a){"use strict";a.fn.serializeJSON=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o;return c=a.serializeJSON,d=this,e=c.setupOpts(b),f=d.serializeArray(),c.readCheckboxUncheckedValues(f,e,d),g={},a.each(f,function(a,b){h=b.name,i=b.value,k=c.extractTypeAndNameWithNoType(h),l=k.nameWithNoType,m=k.type,m||(m=c.attrFromInputWithName(d,h,"data-value-type")),c.validateType(h,m,e),"skip"!==m&&(n=c.splitInputNameIntoKeysArray(l),j=c.parseValue(i,h,m,e),o=!j&&c.shouldSkipFalsy(d,h,l,m,e),o||c.deepSet(g,n,j,e))}),g},a.serializeJSON={defaultOptions:{checkboxUncheckedValue:void 0,parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,skipFalsyValuesForTypes:[],skipFalsyValuesForFields:[],customTypes:{},defaultTypes:{string:function(a){return String(a)},number:function(a){return Number(a)},boolean:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1},null:function(a){var b=["false","null","undefined","","0"];return b.indexOf(a)===-1?a:null},array:function(a){return JSON.parse(a)},object:function(a){return JSON.parse(a)},auto:function(b){return a.serializeJSON.parseValue(b,null,null,{parseNumbers:!0,parseBooleans:!0,parseNulls:!0})},skip:null},useIntKeysAsArrayIndex:!1},setupOpts:function(b){var c,d,e,f,g,h;h=a.serializeJSON,null==b&&(b={}),e=h.defaultOptions||{},d=["checkboxUncheckedValue","parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","skipFalsyValuesForTypes","skipFalsyValuesForFields","customTypes","defaultTypes","useIntKeysAsArrayIndex"];for(c in b)if(d.indexOf(c)===-1)throw new Error("serializeJSON ERROR: invalid option '"+c+"'. Please use one of "+d.join(", "));return f=function(a){return b[a]!==!1&&""!==b[a]&&(b[a]||e[a])},g=f("parseAll"),{checkboxUncheckedValue:f("checkboxUncheckedValue"),parseNumbers:g||f("parseNumbers"),parseBooleans:g||f("parseBooleans"),parseNulls:g||f("parseNulls"),parseWithFunction:f("parseWithFunction"),skipFalsyValuesForTypes:f("skipFalsyValuesForTypes"),skipFalsyValuesForFields:f("skipFalsyValuesForFields"),typeFunctions:a.extend({},f("defaultTypes"),f("customTypes")),useIntKeysAsArrayIndex:f("useIntKeysAsArrayIndex")}},parseValue:function(b,c,d,e){var f,g;return f=a.serializeJSON,g=b,e.typeFunctions&&d&&e.typeFunctions[d]?g=e.typeFunctions[d](b):e.parseNumbers&&f.isNumeric(b)?g=Number(b):!e.parseBooleans||"true"!==b&&"false"!==b?e.parseNulls&&"null"==b&&(g=null):g="true"===b,e.parseWithFunction&&!d&&(g=e.parseWithFunction(g,c)),g},isObject:function(a){return a===Object(a)},isUndefined:function(a){return void 0===a},isValidArrayIndex:function(a){return/^[0-9]+$/.test(String(a))},isNumeric:function(a){return a-parseFloat(a)>=0},optionKeys:function(a){if(Object.keys)return Object.keys(a);var b,c=[];for(b in a)c.push(b);return c},readCheckboxUncheckedValues:function(b,c,d){var e,f,g,h,i;null==c&&(c={}),i=a.serializeJSON,e="input[type=checkbox][name]:not(:checked):not([disabled])",f=d.find(e).add(d.filter(e)),f.each(function(d,e){if(g=a(e),h=g.attr("data-unchecked-value"),null==h&&(h=c.checkboxUncheckedValue),null!=h){if(e.name&&e.name.indexOf("[][")!==-1)throw new Error("serializeJSON ERROR: checkbox unchecked values are not supported on nested arrays of objects like '"+e.name+"'. See https://github.com/marioizquierdo/jquery.serializeJSON/issues/67");b.push({name:e.name,value:h})}})},extractTypeAndNameWithNoType:function(a){var b;return(b=a.match(/(.*):([^:]+)$/))?{nameWithNoType:b[1],type:b[2]}:{nameWithNoType:a,type:null}},shouldSkipFalsy:function(b,c,d,e,f){var g=a.serializeJSON,h=g.attrFromInputWithName(b,c,"data-skip-falsy");if(null!=h)return"false"!==h;var i=f.skipFalsyValuesForFields;if(i&&(i.indexOf(d)!==-1||i.indexOf(c)!==-1))return!0;var j=f.skipFalsyValuesForTypes;return null==e&&(e="string"),!(!j||j.indexOf(e)===-1)},attrFromInputWithName:function(a,b,c){var d,e,f;return d=b.replace(/(:|\.|\[|\]|\s)/g,"\\$1"),e='[name="'+d+'"]',f=a.find(e).add(a.filter(e)),f.attr(c)},validateType:function(b,c,d){var e,f;if(f=a.serializeJSON,e=f.optionKeys(d?d.typeFunctions:f.defaultOptions.defaultTypes),c&&e.indexOf(c)===-1)throw new Error("serializeJSON ERROR: Invalid type "+c+" found in input name '"+b+"', please use one of "+e.join(", "));return!0},splitInputNameIntoKeysArray:function(b){var c,d;return d=a.serializeJSON,c=b.split("["),c=a.map(c,function(a){return a.replace(/\]/g,"")}),""===c[0]&&c.shift(),c},deepSet:function(b,c,d,e){var f,g,h,i,j,k;if(null==e&&(e={}),k=a.serializeJSON,k.isUndefined(b))throw new Error("ArgumentError: param 'o' expected to be an object or array, found undefined");if(!c||0===c.length)throw new Error("ArgumentError: param 'keys' expected to be an array with least one element");f=c[0],1===c.length?""===f?b.push(d):b[f]=d:(g=c[1],""===f&&(i=b.length-1,j=b[i],f=k.isObject(j)&&(k.isUndefined(j[g])||c.length>2)?i:i+1),""===g?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):e.useIntKeysAsArrayIndex&&k.isValidArrayIndex(g)?!k.isUndefined(b[f])&&a.isArray(b[f])||(b[f]=[]):!k.isUndefined(b[f])&&k.isObject(b[f])||(b[f]={}),h=c.slice(1),k.deepSet(b[f],h,d,e))}}});

(function ($) {
	/**
	 * Watch for all the content forms and listen for a submit action
	 */
	$(document).on('submit', 'form.content-form', function (e) {
		e.preventDefault();

		var $form = $(this),
			serialized = $form.serializeJSON(),
			postData = {
				form_type: serialized['form-type'],
				form_id: serialized['form-id'],
				post_id: serialized['post-id'],
				form_builder: serialized['form-builder'],
				data: serialized.data,
				nonce: serialized[ '_wpnonce_' + serialized['form-type'] ],
			};

		$form.addClass('content-form-loading');

		window.jQuery.ajax({
			url: contentFormsSettings.restUrl + `submit`,
			dataType: 'json',
			method: 'POST',
			data: postData,
			beforeSend: function (xhr) {
				xhr.setRequestHeader('X-WP-Nonce', window.contentFormsSettings.nonce);
			},
			success: function (data) {
				$form.removeClass('content-form-loading');

				var status = 'error';

				if ( typeof data.success !== "undefined" && data.success ) {
					status = 'success';
				}

				addContentFormNotice( data.msg, status, $form );

				console.log(data)
			},
			error: function (e) {
				$form.removeClass('content-form-loading');

				addContentFormNotice( e, 'error', $form );

				console.error(e)
			}
		});
	});

/**
 * Handle Form notices
 * @param notice
 * @param type
 * @param $form
 */
var addContentFormNotice = function ( notice, type, $form ) {
		var	noticeStatus = '',
			$currentNotice = $form.children( '.content-form-notice' );

		if ( 'success' === type ) {
			noticeStatus = 'content-form-success';
		} else {
			noticeStatus = 'content-form-error';
		}

		var noticeEl = "<h3 class='content-form-notice " + noticeStatus + "' >" + notice + "</h3>";

		// if an notice already exist, replace it; otherwise create one
		if ( $currentNotice.length > 0 ) {
			$currentNotice.replaceWith( noticeEl )
		} else {
			$form.prepend( noticeEl );
		}
	}
})(jQuery);assets/gutenberg-esnext/index.php000066600000000022151156027310013153 0ustar00<?php
// not here
assets/gutenberg-esnext/package.json000066600000000703151156027310013627 0ustar00{
  "name": "04-controls-esnext",
  "version": "1.0.0",
  "main": "block.js",
  "devDependencies": {
    "babel-core": "^6.25.0",
    "babel-loader": "^7.1.1",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-preset-env": "^1.6.0",
    "cross-env": "^5.0.1",
    "webpack": "^3.1.0"
  },
  "scripts": {
    "build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
    "dev": "cross-env BABEL_ENV=default webpack --watch"
  }
}
assets/gutenberg-esnext/package-lock.json000066600000402515151156027310014564 0ustar00{
  "name": "04-controls-esnext",
  "version": "1.0.0",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
    "acorn": {
      "version": "5.2.1",
      "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz",
      "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==",
      "dev": true
    },
    "acorn-dynamic-import": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz",
      "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=",
      "dev": true,
      "requires": {
        "acorn": "4.0.13"
      },
      "dependencies": {
        "acorn": {
          "version": "4.0.13",
          "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
          "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
          "dev": true
        }
      }
    },
    "ajv": {
      "version": "5.5.1",
      "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz",
      "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=",
      "dev": true,
      "requires": {
        "co": "4.6.0",
        "fast-deep-equal": "1.0.0",
        "fast-json-stable-stringify": "2.0.0",
        "json-schema-traverse": "0.3.1"
      }
    },
    "ajv-keywords": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz",
      "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
      "dev": true
    },
    "align-text": {
      "version": "0.1.4",
      "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
      "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
      "dev": true,
      "requires": {
        "kind-of": "3.2.2",
        "longest": "1.0.1",
        "repeat-string": "1.6.1"
      }
    },
    "ansi-regex": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
      "dev": true
    },
    "ansi-styles": {
      "version": "2.2.1",
      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
      "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
      "dev": true
    },
    "anymatch": {
      "version": "1.3.2",
      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
      "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
      "dev": true,
      "requires": {
        "micromatch": "2.3.11",
        "normalize-path": "2.1.1"
      }
    },
    "arr-diff": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
      "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
      "dev": true,
      "requires": {
        "arr-flatten": "1.1.0"
      }
    },
    "arr-flatten": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
      "dev": true
    },
    "array-unique": {
      "version": "0.2.1",
      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
      "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
      "dev": true
    },
    "asn1.js": {
      "version": "4.9.2",
      "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz",
      "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "inherits": "2.0.3",
        "minimalistic-assert": "1.0.0"
      }
    },
    "assert": {
      "version": "1.4.1",
      "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
      "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
      "dev": true,
      "requires": {
        "util": "0.10.3"
      }
    },
    "async": {
      "version": "2.6.0",
      "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
      "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==",
      "dev": true,
      "requires": {
        "lodash": "4.17.4"
      }
    },
    "async-each": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
      "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
      "dev": true
    },
    "babel-code-frame": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
      "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
      "dev": true,
      "requires": {
        "chalk": "1.1.3",
        "esutils": "2.0.2",
        "js-tokens": "3.0.2"
      }
    },
    "babel-core": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",
      "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=",
      "dev": true,
      "requires": {
        "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-generator": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
      "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=",
      "dev": true,
      "requires": {
        "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": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz",
      "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=",
      "dev": true,
      "requires": {
        "babel-helper-explode-assignable-expression": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-builder-react-jsx": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz",
      "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0",
        "esutils": "2.0.2"
      }
    },
    "babel-helper-call-delegate": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz",
      "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=",
      "dev": true,
      "requires": {
        "babel-helper-hoist-variables": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-define-map": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz",
      "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=",
      "dev": true,
      "requires": {
        "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": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz",
      "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-function-name": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
      "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=",
      "dev": true,
      "requires": {
        "babel-helper-get-function-arity": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-get-function-arity": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz",
      "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-hoist-variables": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz",
      "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-optimise-call-expression": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
      "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-regex": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz",
      "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0",
        "lodash": "4.17.4"
      }
    },
    "babel-helper-remap-async-to-generator": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz",
      "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=",
      "dev": true,
      "requires": {
        "babel-helper-function-name": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helper-replace-supers": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
      "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=",
      "dev": true,
      "requires": {
        "babel-helper-optimise-call-expression": "6.24.1",
        "babel-messages": "6.23.0",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-helpers": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
      "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0"
      }
    },
    "babel-loader": {
      "version": "7.1.2",
      "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz",
      "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==",
      "dev": true,
      "requires": {
        "find-cache-dir": "1.0.0",
        "loader-utils": "1.1.0",
        "mkdirp": "0.5.1"
      }
    },
    "babel-messages": {
      "version": "6.23.0",
      "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
      "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-check-es2015-constants": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
      "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-syntax-async-functions": {
      "version": "6.13.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz",
      "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=",
      "dev": true
    },
    "babel-plugin-syntax-exponentiation-operator": {
      "version": "6.13.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz",
      "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=",
      "dev": true
    },
    "babel-plugin-syntax-jsx": {
      "version": "6.18.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
      "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=",
      "dev": true
    },
    "babel-plugin-syntax-trailing-function-commas": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz",
      "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=",
      "dev": true
    },
    "babel-plugin-transform-async-to-generator": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz",
      "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=",
      "dev": true,
      "requires": {
        "babel-helper-remap-async-to-generator": "6.24.1",
        "babel-plugin-syntax-async-functions": "6.13.0",
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-arrow-functions": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
      "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-block-scoped-functions": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
      "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-block-scoping": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz",
      "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=",
      "dev": true,
      "requires": {
        "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": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz",
      "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=",
      "dev": true,
      "requires": {
        "babel-helper-define-map": "6.26.0",
        "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.26.0",
        "babel-template": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-computed-properties": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz",
      "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-destructuring": {
      "version": "6.23.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
      "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-duplicate-keys": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz",
      "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-for-of": {
      "version": "6.23.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
      "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-function-name": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz",
      "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=",
      "dev": true,
      "requires": {
        "babel-helper-function-name": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-literals": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
      "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-modules-amd": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz",
      "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=",
      "dev": true,
      "requires": {
        "babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-modules-commonjs": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz",
      "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=",
      "dev": true,
      "requires": {
        "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": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz",
      "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=",
      "dev": true,
      "requires": {
        "babel-helper-hoist-variables": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-modules-umd": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz",
      "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=",
      "dev": true,
      "requires": {
        "babel-plugin-transform-es2015-modules-amd": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-object-super": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz",
      "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=",
      "dev": true,
      "requires": {
        "babel-helper-replace-supers": "6.24.1",
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-parameters": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz",
      "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=",
      "dev": true,
      "requires": {
        "babel-helper-call-delegate": "6.24.1",
        "babel-helper-get-function-arity": "6.24.1",
        "babel-runtime": "6.26.0",
        "babel-template": "6.26.0",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-shorthand-properties": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz",
      "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-spread": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
      "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-sticky-regex": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz",
      "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=",
      "dev": true,
      "requires": {
        "babel-helper-regex": "6.26.0",
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-template-literals": {
      "version": "6.22.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
      "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-typeof-symbol": {
      "version": "6.23.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
      "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-es2015-unicode-regex": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz",
      "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=",
      "dev": true,
      "requires": {
        "babel-helper-regex": "6.26.0",
        "babel-runtime": "6.26.0",
        "regexpu-core": "2.0.0"
      }
    },
    "babel-plugin-transform-exponentiation-operator": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz",
      "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=",
      "dev": true,
      "requires": {
        "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1",
        "babel-plugin-syntax-exponentiation-operator": "6.13.0",
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-react-jsx": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz",
      "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=",
      "dev": true,
      "requires": {
        "babel-helper-builder-react-jsx": "6.26.0",
        "babel-plugin-syntax-jsx": "6.18.0",
        "babel-runtime": "6.26.0"
      }
    },
    "babel-plugin-transform-regenerator": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz",
      "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=",
      "dev": true,
      "requires": {
        "regenerator-transform": "0.10.1"
      }
    },
    "babel-plugin-transform-strict-mode": {
      "version": "6.24.1",
      "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
      "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0"
      }
    },
    "babel-preset-env": {
      "version": "1.6.1",
      "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz",
      "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==",
      "dev": true,
      "requires": {
        "babel-plugin-check-es2015-constants": "6.22.0",
        "babel-plugin-syntax-trailing-function-commas": "6.22.0",
        "babel-plugin-transform-async-to-generator": "6.24.1",
        "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.26.0",
        "babel-plugin-transform-es2015-classes": "6.24.1",
        "babel-plugin-transform-es2015-computed-properties": "6.24.1",
        "babel-plugin-transform-es2015-destructuring": "6.23.0",
        "babel-plugin-transform-es2015-duplicate-keys": "6.24.1",
        "babel-plugin-transform-es2015-for-of": "6.23.0",
        "babel-plugin-transform-es2015-function-name": "6.24.1",
        "babel-plugin-transform-es2015-literals": "6.22.0",
        "babel-plugin-transform-es2015-modules-amd": "6.24.1",
        "babel-plugin-transform-es2015-modules-commonjs": "6.26.0",
        "babel-plugin-transform-es2015-modules-systemjs": "6.24.1",
        "babel-plugin-transform-es2015-modules-umd": "6.24.1",
        "babel-plugin-transform-es2015-object-super": "6.24.1",
        "babel-plugin-transform-es2015-parameters": "6.24.1",
        "babel-plugin-transform-es2015-shorthand-properties": "6.24.1",
        "babel-plugin-transform-es2015-spread": "6.22.0",
        "babel-plugin-transform-es2015-sticky-regex": "6.24.1",
        "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.24.1",
        "babel-plugin-transform-exponentiation-operator": "6.24.1",
        "babel-plugin-transform-regenerator": "6.26.0",
        "browserslist": "2.10.0",
        "invariant": "2.2.2",
        "semver": "5.4.1"
      }
    },
    "babel-register": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
      "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
      "dev": true,
      "requires": {
        "babel-core": "6.26.0",
        "babel-runtime": "6.26.0",
        "core-js": "2.5.3",
        "home-or-tmp": "2.0.0",
        "lodash": "4.17.4",
        "mkdirp": "0.5.1",
        "source-map-support": "0.4.18"
      }
    },
    "babel-runtime": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
      "dev": true,
      "requires": {
        "core-js": "2.5.3",
        "regenerator-runtime": "0.11.1"
      }
    },
    "babel-template": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
      "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
      "dev": true,
      "requires": {
        "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": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
      "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
      "dev": true,
      "requires": {
        "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.9",
        "globals": "9.18.0",
        "invariant": "2.2.2",
        "lodash": "4.17.4"
      }
    },
    "babel-types": {
      "version": "6.26.0",
      "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
      "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "esutils": "2.0.2",
        "lodash": "4.17.4",
        "to-fast-properties": "1.0.3"
      }
    },
    "babylon": {
      "version": "6.18.0",
      "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
      "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
      "dev": true
    },
    "balanced-match": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
      "dev": true
    },
    "base64-js": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
      "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==",
      "dev": true
    },
    "big.js": {
      "version": "3.2.0",
      "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
      "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
      "dev": true
    },
    "binary-extensions": {
      "version": "1.11.0",
      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
      "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=",
      "dev": true
    },
    "bn.js": {
      "version": "4.11.8",
      "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
      "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
      "dev": true
    },
    "brace-expansion": {
      "version": "1.1.8",
      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
      "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
      "dev": true,
      "requires": {
        "balanced-match": "1.0.0",
        "concat-map": "0.0.1"
      }
    },
    "braces": {
      "version": "1.8.5",
      "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
      "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
      "dev": true,
      "requires": {
        "expand-range": "1.8.2",
        "preserve": "0.2.0",
        "repeat-element": "1.1.2"
      }
    },
    "brorand": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
      "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
      "dev": true
    },
    "browserify-aes": {
      "version": "1.1.1",
      "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz",
      "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==",
      "dev": true,
      "requires": {
        "buffer-xor": "1.0.3",
        "cipher-base": "1.0.4",
        "create-hash": "1.1.3",
        "evp_bytestokey": "1.0.3",
        "inherits": "2.0.3",
        "safe-buffer": "5.1.1"
      }
    },
    "browserify-cipher": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
      "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
      "dev": true,
      "requires": {
        "browserify-aes": "1.1.1",
        "browserify-des": "1.0.0",
        "evp_bytestokey": "1.0.3"
      }
    },
    "browserify-des": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
      "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
      "dev": true,
      "requires": {
        "cipher-base": "1.0.4",
        "des.js": "1.0.0",
        "inherits": "2.0.3"
      }
    },
    "browserify-rsa": {
      "version": "4.0.1",
      "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
      "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "randombytes": "2.0.5"
      }
    },
    "browserify-sign": {
      "version": "4.0.4",
      "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
      "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "browserify-rsa": "4.0.1",
        "create-hash": "1.1.3",
        "create-hmac": "1.1.6",
        "elliptic": "6.4.0",
        "inherits": "2.0.3",
        "parse-asn1": "5.1.0"
      }
    },
    "browserify-zlib": {
      "version": "0.2.0",
      "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
      "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
      "dev": true,
      "requires": {
        "pako": "1.0.6"
      }
    },
    "browserslist": {
      "version": "2.10.0",
      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.10.0.tgz",
      "integrity": "sha512-WyvzSLsuAVPOjbljXnyeWl14Ae+ukAT8MUuagKVzIDvwBxl4UAwD1xqtyQs2eWYPGUKMeC3Ol62goqYuKqTTcw==",
      "dev": true,
      "requires": {
        "caniuse-lite": "1.0.30000783",
        "electron-to-chromium": "1.3.28"
      }
    },
    "buffer": {
      "version": "4.9.1",
      "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
      "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
      "dev": true,
      "requires": {
        "base64-js": "1.2.1",
        "ieee754": "1.1.8",
        "isarray": "1.0.0"
      }
    },
    "buffer-xor": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
      "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
      "dev": true
    },
    "builtin-modules": {
      "version": "1.1.1",
      "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
      "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
      "dev": true
    },
    "builtin-status-codes": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
      "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
      "dev": true
    },
    "camelcase": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
      "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
      "dev": true
    },
    "caniuse-lite": {
      "version": "1.0.30000783",
      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000783.tgz",
      "integrity": "sha1-m1SZ+xtQPSNF0SqmuGEoUvQnb/0=",
      "dev": true
    },
    "center-align": {
      "version": "0.1.3",
      "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
      "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
      "dev": true,
      "requires": {
        "align-text": "0.1.4",
        "lazy-cache": "1.0.4"
      }
    },
    "chalk": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
      "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
      "dev": true,
      "requires": {
        "ansi-styles": "2.2.1",
        "escape-string-regexp": "1.0.5",
        "has-ansi": "2.0.0",
        "strip-ansi": "3.0.1",
        "supports-color": "2.0.0"
      }
    },
    "chokidar": {
      "version": "1.7.0",
      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
      "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
      "dev": true,
      "requires": {
        "anymatch": "1.3.2",
        "async-each": "1.0.1",
        "fsevents": "1.1.3",
        "glob-parent": "2.0.0",
        "inherits": "2.0.3",
        "is-binary-path": "1.0.1",
        "is-glob": "2.0.1",
        "path-is-absolute": "1.0.1",
        "readdirp": "2.1.0"
      }
    },
    "cipher-base": {
      "version": "1.0.4",
      "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
      "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
      "dev": true,
      "requires": {
        "inherits": "2.0.3",
        "safe-buffer": "5.1.1"
      }
    },
    "cliui": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
      "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
      "dev": true,
      "requires": {
        "center-align": "0.1.3",
        "right-align": "0.1.3",
        "wordwrap": "0.0.2"
      }
    },
    "co": {
      "version": "4.6.0",
      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
      "dev": true
    },
    "code-point-at": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
      "dev": true
    },
    "commondir": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
      "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
      "dev": true
    },
    "concat-map": {
      "version": "0.0.1",
      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
      "dev": true
    },
    "console-browserify": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
      "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
      "dev": true,
      "requires": {
        "date-now": "0.1.4"
      }
    },
    "constants-browserify": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
      "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
      "dev": true
    },
    "convert-source-map": {
      "version": "1.5.1",
      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz",
      "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=",
      "dev": true
    },
    "core-js": {
      "version": "2.5.3",
      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
      "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=",
      "dev": true
    },
    "core-util-is": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
      "dev": true
    },
    "create-ecdh": {
      "version": "4.0.0",
      "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
      "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "elliptic": "6.4.0"
      }
    },
    "create-hash": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
      "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
      "dev": true,
      "requires": {
        "cipher-base": "1.0.4",
        "inherits": "2.0.3",
        "ripemd160": "2.0.1",
        "sha.js": "2.4.9"
      }
    },
    "create-hmac": {
      "version": "1.1.6",
      "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
      "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
      "dev": true,
      "requires": {
        "cipher-base": "1.0.4",
        "create-hash": "1.1.3",
        "inherits": "2.0.3",
        "ripemd160": "2.0.1",
        "safe-buffer": "5.1.1",
        "sha.js": "2.4.9"
      }
    },
    "cross-env": {
      "version": "5.1.1",
      "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.1.tgz",
      "integrity": "sha512-Wtvr+z0Z06KO1JxjfRRsPC+df7biIOiuV4iZ73cThjFGkH+ULBZq1MkBdywEcJC4cTDbO6c8IjgRjfswx3YTBA==",
      "dev": true,
      "requires": {
        "cross-spawn": "5.1.0",
        "is-windows": "1.0.1"
      }
    },
    "cross-spawn": {
      "version": "5.1.0",
      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
      "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
      "dev": true,
      "requires": {
        "lru-cache": "4.1.1",
        "shebang-command": "1.2.0",
        "which": "1.3.0"
      }
    },
    "crypto-browserify": {
      "version": "3.12.0",
      "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
      "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
      "dev": true,
      "requires": {
        "browserify-cipher": "1.0.0",
        "browserify-sign": "4.0.4",
        "create-ecdh": "4.0.0",
        "create-hash": "1.1.3",
        "create-hmac": "1.1.6",
        "diffie-hellman": "5.0.2",
        "inherits": "2.0.3",
        "pbkdf2": "3.0.14",
        "public-encrypt": "4.0.0",
        "randombytes": "2.0.5",
        "randomfill": "1.0.3"
      }
    },
    "d": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
      "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
      "dev": true,
      "requires": {
        "es5-ext": "0.10.37"
      }
    },
    "date-now": {
      "version": "0.1.4",
      "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
      "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
      "dev": true
    },
    "debug": {
      "version": "2.6.9",
      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
      "dev": true,
      "requires": {
        "ms": "2.0.0"
      }
    },
    "decamelize": {
      "version": "1.2.0",
      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
      "dev": true
    },
    "des.js": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
      "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
      "dev": true,
      "requires": {
        "inherits": "2.0.3",
        "minimalistic-assert": "1.0.0"
      }
    },
    "detect-indent": {
      "version": "4.0.0",
      "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
      "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
      "dev": true,
      "requires": {
        "repeating": "2.0.1"
      }
    },
    "diffie-hellman": {
      "version": "5.0.2",
      "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
      "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "miller-rabin": "4.0.1",
        "randombytes": "2.0.5"
      }
    },
    "domain-browser": {
      "version": "1.1.7",
      "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
      "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
      "dev": true
    },
    "electron-to-chromium": {
      "version": "1.3.28",
      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz",
      "integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=",
      "dev": true
    },
    "elliptic": {
      "version": "6.4.0",
      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
      "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "brorand": "1.1.0",
        "hash.js": "1.1.3",
        "hmac-drbg": "1.0.1",
        "inherits": "2.0.3",
        "minimalistic-assert": "1.0.0",
        "minimalistic-crypto-utils": "1.0.1"
      }
    },
    "emojis-list": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
      "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
      "dev": true
    },
    "enhanced-resolve": {
      "version": "3.4.1",
      "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
      "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
      "dev": true,
      "requires": {
        "graceful-fs": "4.1.11",
        "memory-fs": "0.4.1",
        "object-assign": "4.1.1",
        "tapable": "0.2.8"
      }
    },
    "errno": {
      "version": "0.1.6",
      "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz",
      "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==",
      "dev": true,
      "requires": {
        "prr": "1.0.1"
      }
    },
    "error-ex": {
      "version": "1.3.1",
      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
      "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
      "dev": true,
      "requires": {
        "is-arrayish": "0.2.1"
      }
    },
    "es5-ext": {
      "version": "0.10.37",
      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz",
      "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=",
      "dev": true,
      "requires": {
        "es6-iterator": "2.0.3",
        "es6-symbol": "3.1.1"
      }
    },
    "es6-iterator": {
      "version": "2.0.3",
      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37",
        "es6-symbol": "3.1.1"
      }
    },
    "es6-map": {
      "version": "0.1.5",
      "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
      "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37",
        "es6-iterator": "2.0.3",
        "es6-set": "0.1.5",
        "es6-symbol": "3.1.1",
        "event-emitter": "0.3.5"
      }
    },
    "es6-set": {
      "version": "0.1.5",
      "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
      "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37",
        "es6-iterator": "2.0.3",
        "es6-symbol": "3.1.1",
        "event-emitter": "0.3.5"
      }
    },
    "es6-symbol": {
      "version": "3.1.1",
      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
      "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37"
      }
    },
    "es6-weak-map": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
      "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37",
        "es6-iterator": "2.0.3",
        "es6-symbol": "3.1.1"
      }
    },
    "escape-string-regexp": {
      "version": "1.0.5",
      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
      "dev": true
    },
    "escope": {
      "version": "3.6.0",
      "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
      "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
      "dev": true,
      "requires": {
        "es6-map": "0.1.5",
        "es6-weak-map": "2.0.2",
        "esrecurse": "4.2.0",
        "estraverse": "4.2.0"
      }
    },
    "esrecurse": {
      "version": "4.2.0",
      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
      "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
      "dev": true,
      "requires": {
        "estraverse": "4.2.0",
        "object-assign": "4.1.1"
      }
    },
    "estraverse": {
      "version": "4.2.0",
      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
      "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
      "dev": true
    },
    "esutils": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
      "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
      "dev": true
    },
    "event-emitter": {
      "version": "0.3.5",
      "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
      "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
      "dev": true,
      "requires": {
        "d": "1.0.0",
        "es5-ext": "0.10.37"
      }
    },
    "events": {
      "version": "1.1.1",
      "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
      "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
      "dev": true
    },
    "evp_bytestokey": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
      "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
      "dev": true,
      "requires": {
        "md5.js": "1.3.4",
        "safe-buffer": "5.1.1"
      }
    },
    "execa": {
      "version": "0.7.0",
      "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
      "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
      "dev": true,
      "requires": {
        "cross-spawn": "5.1.0",
        "get-stream": "3.0.0",
        "is-stream": "1.1.0",
        "npm-run-path": "2.0.2",
        "p-finally": "1.0.0",
        "signal-exit": "3.0.2",
        "strip-eof": "1.0.0"
      }
    },
    "expand-brackets": {
      "version": "0.1.5",
      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
      "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
      "dev": true,
      "requires": {
        "is-posix-bracket": "0.1.1"
      }
    },
    "expand-range": {
      "version": "1.8.2",
      "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
      "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
      "dev": true,
      "requires": {
        "fill-range": "2.2.3"
      }
    },
    "extglob": {
      "version": "0.3.2",
      "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
      "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
      "dev": true,
      "requires": {
        "is-extglob": "1.0.0"
      }
    },
    "fast-deep-equal": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
      "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
      "dev": true
    },
    "fast-json-stable-stringify": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
      "dev": true
    },
    "filename-regex": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
      "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
      "dev": true
    },
    "fill-range": {
      "version": "2.2.3",
      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
      "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
      "dev": true,
      "requires": {
        "is-number": "2.1.0",
        "isobject": "2.1.0",
        "randomatic": "1.1.7",
        "repeat-element": "1.1.2",
        "repeat-string": "1.6.1"
      }
    },
    "find-cache-dir": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
      "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
      "dev": true,
      "requires": {
        "commondir": "1.0.1",
        "make-dir": "1.1.0",
        "pkg-dir": "2.0.0"
      }
    },
    "find-up": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
      "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
      "dev": true,
      "requires": {
        "locate-path": "2.0.0"
      }
    },
    "for-in": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
      "dev": true
    },
    "for-own": {
      "version": "0.1.5",
      "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
      "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
      "dev": true,
      "requires": {
        "for-in": "1.0.2"
      }
    },
    "fsevents": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
      "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
      "dev": true,
      "optional": true,
      "requires": {
        "nan": "2.8.0",
        "node-pre-gyp": "0.6.39"
      },
      "dependencies": {
        "abbrev": {
          "version": "1.1.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "ajv": {
          "version": "4.11.8",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "co": "4.6.0",
            "json-stable-stringify": "1.0.1"
          }
        },
        "ansi-regex": {
          "version": "2.1.1",
          "bundled": true,
          "dev": true
        },
        "aproba": {
          "version": "1.1.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "are-we-there-yet": {
          "version": "1.1.4",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "delegates": "1.0.0",
            "readable-stream": "2.2.9"
          }
        },
        "asn1": {
          "version": "0.2.3",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "assert-plus": {
          "version": "0.2.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "asynckit": {
          "version": "0.4.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "aws-sign2": {
          "version": "0.6.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "aws4": {
          "version": "1.6.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "balanced-match": {
          "version": "0.4.2",
          "bundled": true,
          "dev": true
        },
        "bcrypt-pbkdf": {
          "version": "1.0.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "tweetnacl": "0.14.5"
          }
        },
        "block-stream": {
          "version": "0.0.9",
          "bundled": true,
          "dev": true,
          "requires": {
            "inherits": "2.0.3"
          }
        },
        "boom": {
          "version": "2.10.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "hoek": "2.16.3"
          }
        },
        "brace-expansion": {
          "version": "1.1.7",
          "bundled": true,
          "dev": true,
          "requires": {
            "balanced-match": "0.4.2",
            "concat-map": "0.0.1"
          }
        },
        "buffer-shims": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true
        },
        "caseless": {
          "version": "0.12.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "co": {
          "version": "4.6.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "code-point-at": {
          "version": "1.1.0",
          "bundled": true,
          "dev": true
        },
        "combined-stream": {
          "version": "1.0.5",
          "bundled": true,
          "dev": true,
          "requires": {
            "delayed-stream": "1.0.0"
          }
        },
        "concat-map": {
          "version": "0.0.1",
          "bundled": true,
          "dev": true
        },
        "console-control-strings": {
          "version": "1.1.0",
          "bundled": true,
          "dev": true
        },
        "core-util-is": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true
        },
        "cryptiles": {
          "version": "2.0.5",
          "bundled": true,
          "dev": true,
          "requires": {
            "boom": "2.10.1"
          }
        },
        "dashdash": {
          "version": "1.14.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "assert-plus": "1.0.0"
          },
          "dependencies": {
            "assert-plus": {
              "version": "1.0.0",
              "bundled": true,
              "dev": true,
              "optional": true
            }
          }
        },
        "debug": {
          "version": "2.6.8",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "ms": "2.0.0"
          }
        },
        "deep-extend": {
          "version": "0.4.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "delayed-stream": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true
        },
        "delegates": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "detect-libc": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "ecc-jsbn": {
          "version": "0.1.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "jsbn": "0.1.1"
          }
        },
        "extend": {
          "version": "3.0.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "extsprintf": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true
        },
        "forever-agent": {
          "version": "0.6.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "form-data": {
          "version": "2.1.4",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "asynckit": "0.4.0",
            "combined-stream": "1.0.5",
            "mime-types": "2.1.15"
          }
        },
        "fs.realpath": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true
        },
        "fstream": {
          "version": "1.0.11",
          "bundled": true,
          "dev": true,
          "requires": {
            "graceful-fs": "4.1.11",
            "inherits": "2.0.3",
            "mkdirp": "0.5.1",
            "rimraf": "2.6.1"
          }
        },
        "fstream-ignore": {
          "version": "1.0.5",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "fstream": "1.0.11",
            "inherits": "2.0.3",
            "minimatch": "3.0.4"
          }
        },
        "gauge": {
          "version": "2.7.4",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "aproba": "1.1.1",
            "console-control-strings": "1.1.0",
            "has-unicode": "2.0.1",
            "object-assign": "4.1.1",
            "signal-exit": "3.0.2",
            "string-width": "1.0.2",
            "strip-ansi": "3.0.1",
            "wide-align": "1.1.2"
          }
        },
        "getpass": {
          "version": "0.1.7",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "assert-plus": "1.0.0"
          },
          "dependencies": {
            "assert-plus": {
              "version": "1.0.0",
              "bundled": true,
              "dev": true,
              "optional": true
            }
          }
        },
        "glob": {
          "version": "7.1.2",
          "bundled": true,
          "dev": true,
          "requires": {
            "fs.realpath": "1.0.0",
            "inflight": "1.0.6",
            "inherits": "2.0.3",
            "minimatch": "3.0.4",
            "once": "1.4.0",
            "path-is-absolute": "1.0.1"
          }
        },
        "graceful-fs": {
          "version": "4.1.11",
          "bundled": true,
          "dev": true
        },
        "har-schema": {
          "version": "1.0.5",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "har-validator": {
          "version": "4.2.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "ajv": "4.11.8",
            "har-schema": "1.0.5"
          }
        },
        "has-unicode": {
          "version": "2.0.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "hawk": {
          "version": "3.1.3",
          "bundled": true,
          "dev": true,
          "requires": {
            "boom": "2.10.1",
            "cryptiles": "2.0.5",
            "hoek": "2.16.3",
            "sntp": "1.0.9"
          }
        },
        "hoek": {
          "version": "2.16.3",
          "bundled": true,
          "dev": true
        },
        "http-signature": {
          "version": "1.1.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "assert-plus": "0.2.0",
            "jsprim": "1.4.0",
            "sshpk": "1.13.0"
          }
        },
        "inflight": {
          "version": "1.0.6",
          "bundled": true,
          "dev": true,
          "requires": {
            "once": "1.4.0",
            "wrappy": "1.0.2"
          }
        },
        "inherits": {
          "version": "2.0.3",
          "bundled": true,
          "dev": true
        },
        "ini": {
          "version": "1.3.4",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "is-fullwidth-code-point": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true,
          "requires": {
            "number-is-nan": "1.0.1"
          }
        },
        "is-typedarray": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "isarray": {
          "version": "1.0.0",
          "bundled": true,
          "dev": true
        },
        "isstream": {
          "version": "0.1.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "jodid25519": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "jsbn": "0.1.1"
          }
        },
        "jsbn": {
          "version": "0.1.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "json-schema": {
          "version": "0.2.3",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "json-stable-stringify": {
          "version": "1.0.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "jsonify": "0.0.0"
          }
        },
        "json-stringify-safe": {
          "version": "5.0.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "jsonify": {
          "version": "0.0.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "jsprim": {
          "version": "1.4.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "assert-plus": "1.0.0",
            "extsprintf": "1.0.2",
            "json-schema": "0.2.3",
            "verror": "1.3.6"
          },
          "dependencies": {
            "assert-plus": {
              "version": "1.0.0",
              "bundled": true,
              "dev": true,
              "optional": true
            }
          }
        },
        "mime-db": {
          "version": "1.27.0",
          "bundled": true,
          "dev": true
        },
        "mime-types": {
          "version": "2.1.15",
          "bundled": true,
          "dev": true,
          "requires": {
            "mime-db": "1.27.0"
          }
        },
        "minimatch": {
          "version": "3.0.4",
          "bundled": true,
          "dev": true,
          "requires": {
            "brace-expansion": "1.1.7"
          }
        },
        "minimist": {
          "version": "0.0.8",
          "bundled": true,
          "dev": true
        },
        "mkdirp": {
          "version": "0.5.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "minimist": "0.0.8"
          }
        },
        "ms": {
          "version": "2.0.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "node-pre-gyp": {
          "version": "0.6.39",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "detect-libc": "1.0.2",
            "hawk": "3.1.3",
            "mkdirp": "0.5.1",
            "nopt": "4.0.1",
            "npmlog": "4.1.0",
            "rc": "1.2.1",
            "request": "2.81.0",
            "rimraf": "2.6.1",
            "semver": "5.3.0",
            "tar": "2.2.1",
            "tar-pack": "3.4.0"
          }
        },
        "nopt": {
          "version": "4.0.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "abbrev": "1.1.0",
            "osenv": "0.1.4"
          }
        },
        "npmlog": {
          "version": "4.1.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "are-we-there-yet": "1.1.4",
            "console-control-strings": "1.1.0",
            "gauge": "2.7.4",
            "set-blocking": "2.0.0"
          }
        },
        "number-is-nan": {
          "version": "1.0.1",
          "bundled": true,
          "dev": true
        },
        "oauth-sign": {
          "version": "0.8.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "object-assign": {
          "version": "4.1.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "once": {
          "version": "1.4.0",
          "bundled": true,
          "dev": true,
          "requires": {
            "wrappy": "1.0.2"
          }
        },
        "os-homedir": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "os-tmpdir": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "osenv": {
          "version": "0.1.4",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "os-homedir": "1.0.2",
            "os-tmpdir": "1.0.2"
          }
        },
        "path-is-absolute": {
          "version": "1.0.1",
          "bundled": true,
          "dev": true
        },
        "performance-now": {
          "version": "0.2.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "process-nextick-args": {
          "version": "1.0.7",
          "bundled": true,
          "dev": true
        },
        "punycode": {
          "version": "1.4.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "qs": {
          "version": "6.4.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "rc": {
          "version": "1.2.1",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "deep-extend": "0.4.2",
            "ini": "1.3.4",
            "minimist": "1.2.0",
            "strip-json-comments": "2.0.1"
          },
          "dependencies": {
            "minimist": {
              "version": "1.2.0",
              "bundled": true,
              "dev": true,
              "optional": true
            }
          }
        },
        "readable-stream": {
          "version": "2.2.9",
          "bundled": true,
          "dev": true,
          "requires": {
            "buffer-shims": "1.0.0",
            "core-util-is": "1.0.2",
            "inherits": "2.0.3",
            "isarray": "1.0.0",
            "process-nextick-args": "1.0.7",
            "string_decoder": "1.0.1",
            "util-deprecate": "1.0.2"
          }
        },
        "request": {
          "version": "2.81.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "aws-sign2": "0.6.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.1.4",
            "har-validator": "4.2.1",
            "hawk": "3.1.3",
            "http-signature": "1.1.1",
            "is-typedarray": "1.0.0",
            "isstream": "0.1.2",
            "json-stringify-safe": "5.0.1",
            "mime-types": "2.1.15",
            "oauth-sign": "0.8.2",
            "performance-now": "0.2.0",
            "qs": "6.4.0",
            "safe-buffer": "5.0.1",
            "stringstream": "0.0.5",
            "tough-cookie": "2.3.2",
            "tunnel-agent": "0.6.0",
            "uuid": "3.0.1"
          }
        },
        "rimraf": {
          "version": "2.6.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "glob": "7.1.2"
          }
        },
        "safe-buffer": {
          "version": "5.0.1",
          "bundled": true,
          "dev": true
        },
        "semver": {
          "version": "5.3.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "set-blocking": {
          "version": "2.0.0",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "signal-exit": {
          "version": "3.0.2",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "sntp": {
          "version": "1.0.9",
          "bundled": true,
          "dev": true,
          "requires": {
            "hoek": "2.16.3"
          }
        },
        "sshpk": {
          "version": "1.13.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "asn1": "0.2.3",
            "assert-plus": "1.0.0",
            "bcrypt-pbkdf": "1.0.1",
            "dashdash": "1.14.1",
            "ecc-jsbn": "0.1.1",
            "getpass": "0.1.7",
            "jodid25519": "1.0.2",
            "jsbn": "0.1.1",
            "tweetnacl": "0.14.5"
          },
          "dependencies": {
            "assert-plus": {
              "version": "1.0.0",
              "bundled": true,
              "dev": true,
              "optional": true
            }
          }
        },
        "string-width": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true,
          "requires": {
            "code-point-at": "1.1.0",
            "is-fullwidth-code-point": "1.0.0",
            "strip-ansi": "3.0.1"
          }
        },
        "string_decoder": {
          "version": "1.0.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "safe-buffer": "5.0.1"
          }
        },
        "stringstream": {
          "version": "0.0.5",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "strip-ansi": {
          "version": "3.0.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "ansi-regex": "2.1.1"
          }
        },
        "strip-json-comments": {
          "version": "2.0.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "tar": {
          "version": "2.2.1",
          "bundled": true,
          "dev": true,
          "requires": {
            "block-stream": "0.0.9",
            "fstream": "1.0.11",
            "inherits": "2.0.3"
          }
        },
        "tar-pack": {
          "version": "3.4.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "debug": "2.6.8",
            "fstream": "1.0.11",
            "fstream-ignore": "1.0.5",
            "once": "1.4.0",
            "readable-stream": "2.2.9",
            "rimraf": "2.6.1",
            "tar": "2.2.1",
            "uid-number": "0.0.6"
          }
        },
        "tough-cookie": {
          "version": "2.3.2",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "punycode": "1.4.1"
          }
        },
        "tunnel-agent": {
          "version": "0.6.0",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "safe-buffer": "5.0.1"
          }
        },
        "tweetnacl": {
          "version": "0.14.5",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "uid-number": {
          "version": "0.0.6",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "util-deprecate": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true
        },
        "uuid": {
          "version": "3.0.1",
          "bundled": true,
          "dev": true,
          "optional": true
        },
        "verror": {
          "version": "1.3.6",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "extsprintf": "1.0.2"
          }
        },
        "wide-align": {
          "version": "1.1.2",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "string-width": "1.0.2"
          }
        },
        "wrappy": {
          "version": "1.0.2",
          "bundled": true,
          "dev": true
        }
      }
    },
    "get-caller-file": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
      "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
      "dev": true
    },
    "get-stream": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
      "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
      "dev": true
    },
    "glob-base": {
      "version": "0.3.0",
      "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
      "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
      "dev": true,
      "requires": {
        "glob-parent": "2.0.0",
        "is-glob": "2.0.1"
      }
    },
    "glob-parent": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
      "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
      "dev": true,
      "requires": {
        "is-glob": "2.0.1"
      }
    },
    "globals": {
      "version": "9.18.0",
      "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
      "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
      "dev": true
    },
    "graceful-fs": {
      "version": "4.1.11",
      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
      "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
      "dev": true
    },
    "has-ansi": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
      "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
      "dev": true,
      "requires": {
        "ansi-regex": "2.1.1"
      }
    },
    "has-flag": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
      "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
      "dev": true
    },
    "hash-base": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
      "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
      "dev": true,
      "requires": {
        "inherits": "2.0.3"
      }
    },
    "hash.js": {
      "version": "1.1.3",
      "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
      "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
      "dev": true,
      "requires": {
        "inherits": "2.0.3",
        "minimalistic-assert": "1.0.0"
      }
    },
    "hmac-drbg": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
      "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
      "dev": true,
      "requires": {
        "hash.js": "1.1.3",
        "minimalistic-assert": "1.0.0",
        "minimalistic-crypto-utils": "1.0.1"
      }
    },
    "home-or-tmp": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
      "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
      "dev": true,
      "requires": {
        "os-homedir": "1.0.2",
        "os-tmpdir": "1.0.2"
      }
    },
    "hosted-git-info": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
      "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==",
      "dev": true
    },
    "https-browserify": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
      "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
      "dev": true
    },
    "ieee754": {
      "version": "1.1.8",
      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
      "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
      "dev": true
    },
    "indexof": {
      "version": "0.0.1",
      "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
      "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
      "dev": true
    },
    "inherits": {
      "version": "2.0.3",
      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
      "dev": true
    },
    "interpret": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
      "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
      "dev": true
    },
    "invariant": {
      "version": "2.2.2",
      "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
      "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
      "dev": true,
      "requires": {
        "loose-envify": "1.3.1"
      }
    },
    "invert-kv": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
      "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
      "dev": true
    },
    "is-arrayish": {
      "version": "0.2.1",
      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
      "dev": true
    },
    "is-binary-path": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
      "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
      "dev": true,
      "requires": {
        "binary-extensions": "1.11.0"
      }
    },
    "is-buffer": {
      "version": "1.1.6",
      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
      "dev": true
    },
    "is-builtin-module": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
      "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
      "dev": true,
      "requires": {
        "builtin-modules": "1.1.1"
      }
    },
    "is-dotfile": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
      "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
      "dev": true
    },
    "is-equal-shallow": {
      "version": "0.1.3",
      "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
      "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
      "dev": true,
      "requires": {
        "is-primitive": "2.0.0"
      }
    },
    "is-extendable": {
      "version": "0.1.1",
      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
      "dev": true
    },
    "is-extglob": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
      "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
      "dev": true
    },
    "is-finite": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
      "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
      "dev": true,
      "requires": {
        "number-is-nan": "1.0.1"
      }
    },
    "is-fullwidth-code-point": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
      "dev": true,
      "requires": {
        "number-is-nan": "1.0.1"
      }
    },
    "is-glob": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
      "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
      "dev": true,
      "requires": {
        "is-extglob": "1.0.0"
      }
    },
    "is-number": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
      "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
      "dev": true,
      "requires": {
        "kind-of": "3.2.2"
      }
    },
    "is-posix-bracket": {
      "version": "0.1.1",
      "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
      "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
      "dev": true
    },
    "is-primitive": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
      "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
      "dev": true
    },
    "is-stream": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
      "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
      "dev": true
    },
    "is-windows": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz",
      "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=",
      "dev": true
    },
    "isarray": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
      "dev": true
    },
    "isexe": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
      "dev": true
    },
    "isobject": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
      "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
      "dev": true,
      "requires": {
        "isarray": "1.0.0"
      }
    },
    "js-tokens": {
      "version": "3.0.2",
      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
      "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
      "dev": true
    },
    "jsesc": {
      "version": "1.3.0",
      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
      "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
      "dev": true
    },
    "json-loader": {
      "version": "0.5.7",
      "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",
      "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",
      "dev": true
    },
    "json-schema-traverse": {
      "version": "0.3.1",
      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
      "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
      "dev": true
    },
    "json5": {
      "version": "0.5.1",
      "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
      "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
      "dev": true
    },
    "kind-of": {
      "version": "3.2.2",
      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
      "dev": true,
      "requires": {
        "is-buffer": "1.1.6"
      }
    },
    "lazy-cache": {
      "version": "1.0.4",
      "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
      "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
      "dev": true
    },
    "lcid": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
      "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
      "dev": true,
      "requires": {
        "invert-kv": "1.0.0"
      }
    },
    "load-json-file": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
      "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
      "dev": true,
      "requires": {
        "graceful-fs": "4.1.11",
        "parse-json": "2.2.0",
        "pify": "2.3.0",
        "strip-bom": "3.0.0"
      },
      "dependencies": {
        "pify": {
          "version": "2.3.0",
          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
          "dev": true
        }
      }
    },
    "loader-runner": {
      "version": "2.3.0",
      "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz",
      "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=",
      "dev": true
    },
    "loader-utils": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
      "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
      "dev": true,
      "requires": {
        "big.js": "3.2.0",
        "emojis-list": "2.1.0",
        "json5": "0.5.1"
      }
    },
    "locate-path": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
      "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
      "dev": true,
      "requires": {
        "p-locate": "2.0.0",
        "path-exists": "3.0.0"
      }
    },
    "lodash": {
      "version": "4.17.4",
      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
      "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
      "dev": true
    },
    "longest": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
      "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
      "dev": true
    },
    "loose-envify": {
      "version": "1.3.1",
      "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
      "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
      "dev": true,
      "requires": {
        "js-tokens": "3.0.2"
      }
    },
    "lru-cache": {
      "version": "4.1.1",
      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
      "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
      "dev": true,
      "requires": {
        "pseudomap": "1.0.2",
        "yallist": "2.1.2"
      }
    },
    "make-dir": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz",
      "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==",
      "dev": true,
      "requires": {
        "pify": "3.0.0"
      }
    },
    "md5.js": {
      "version": "1.3.4",
      "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz",
      "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=",
      "dev": true,
      "requires": {
        "hash-base": "3.0.4",
        "inherits": "2.0.3"
      },
      "dependencies": {
        "hash-base": {
          "version": "3.0.4",
          "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
          "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
          "dev": true,
          "requires": {
            "inherits": "2.0.3",
            "safe-buffer": "5.1.1"
          }
        }
      }
    },
    "mem": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
      "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
      "dev": true,
      "requires": {
        "mimic-fn": "1.1.0"
      }
    },
    "memory-fs": {
      "version": "0.4.1",
      "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
      "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
      "dev": true,
      "requires": {
        "errno": "0.1.6",
        "readable-stream": "2.3.3"
      }
    },
    "micromatch": {
      "version": "2.3.11",
      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
      "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
      "dev": true,
      "requires": {
        "arr-diff": "2.0.0",
        "array-unique": "0.2.1",
        "braces": "1.8.5",
        "expand-brackets": "0.1.5",
        "extglob": "0.3.2",
        "filename-regex": "2.0.1",
        "is-extglob": "1.0.0",
        "is-glob": "2.0.1",
        "kind-of": "3.2.2",
        "normalize-path": "2.1.1",
        "object.omit": "2.0.1",
        "parse-glob": "3.0.4",
        "regex-cache": "0.4.4"
      }
    },
    "miller-rabin": {
      "version": "4.0.1",
      "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
      "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "brorand": "1.1.0"
      }
    },
    "mimic-fn": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
      "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=",
      "dev": true
    },
    "minimalistic-assert": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
      "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
      "dev": true
    },
    "minimalistic-crypto-utils": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
      "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
      "dev": true
    },
    "minimatch": {
      "version": "3.0.4",
      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
      "dev": true,
      "requires": {
        "brace-expansion": "1.1.8"
      }
    },
    "minimist": {
      "version": "0.0.8",
      "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
      "dev": true
    },
    "mkdirp": {
      "version": "0.5.1",
      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
      "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
      "dev": true,
      "requires": {
        "minimist": "0.0.8"
      }
    },
    "ms": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
      "dev": true
    },
    "nan": {
      "version": "2.8.0",
      "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz",
      "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=",
      "dev": true,
      "optional": true
    },
    "node-libs-browser": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz",
      "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==",
      "dev": true,
      "requires": {
        "assert": "1.4.1",
        "browserify-zlib": "0.2.0",
        "buffer": "4.9.1",
        "console-browserify": "1.1.0",
        "constants-browserify": "1.0.0",
        "crypto-browserify": "3.12.0",
        "domain-browser": "1.1.7",
        "events": "1.1.1",
        "https-browserify": "1.0.0",
        "os-browserify": "0.3.0",
        "path-browserify": "0.0.0",
        "process": "0.11.10",
        "punycode": "1.4.1",
        "querystring-es3": "0.2.1",
        "readable-stream": "2.3.3",
        "stream-browserify": "2.0.1",
        "stream-http": "2.7.2",
        "string_decoder": "1.0.3",
        "timers-browserify": "2.0.4",
        "tty-browserify": "0.0.0",
        "url": "0.11.0",
        "util": "0.10.3",
        "vm-browserify": "0.0.4"
      }
    },
    "normalize-package-data": {
      "version": "2.4.0",
      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
      "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
      "dev": true,
      "requires": {
        "hosted-git-info": "2.5.0",
        "is-builtin-module": "1.0.0",
        "semver": "5.4.1",
        "validate-npm-package-license": "3.0.1"
      }
    },
    "normalize-path": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
      "dev": true,
      "requires": {
        "remove-trailing-separator": "1.1.0"
      }
    },
    "npm-run-path": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
      "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
      "dev": true,
      "requires": {
        "path-key": "2.0.1"
      }
    },
    "number-is-nan": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
      "dev": true
    },
    "object-assign": {
      "version": "4.1.1",
      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
      "dev": true
    },
    "object.omit": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
      "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
      "dev": true,
      "requires": {
        "for-own": "0.1.5",
        "is-extendable": "0.1.1"
      }
    },
    "os-browserify": {
      "version": "0.3.0",
      "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
      "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
      "dev": true
    },
    "os-homedir": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
      "dev": true
    },
    "os-locale": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
      "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
      "dev": true,
      "requires": {
        "execa": "0.7.0",
        "lcid": "1.0.0",
        "mem": "1.1.0"
      }
    },
    "os-tmpdir": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
      "dev": true
    },
    "p-finally": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
      "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
      "dev": true
    },
    "p-limit": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz",
      "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=",
      "dev": true
    },
    "p-locate": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
      "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
      "dev": true,
      "requires": {
        "p-limit": "1.1.0"
      }
    },
    "pako": {
      "version": "1.0.6",
      "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz",
      "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==",
      "dev": true
    },
    "parse-asn1": {
      "version": "5.1.0",
      "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
      "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
      "dev": true,
      "requires": {
        "asn1.js": "4.9.2",
        "browserify-aes": "1.1.1",
        "create-hash": "1.1.3",
        "evp_bytestokey": "1.0.3",
        "pbkdf2": "3.0.14"
      }
    },
    "parse-glob": {
      "version": "3.0.4",
      "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
      "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
      "dev": true,
      "requires": {
        "glob-base": "0.3.0",
        "is-dotfile": "1.0.3",
        "is-extglob": "1.0.0",
        "is-glob": "2.0.1"
      }
    },
    "parse-json": {
      "version": "2.2.0",
      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
      "dev": true,
      "requires": {
        "error-ex": "1.3.1"
      }
    },
    "path-browserify": {
      "version": "0.0.0",
      "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
      "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
      "dev": true
    },
    "path-exists": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
      "dev": true
    },
    "path-is-absolute": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
      "dev": true
    },
    "path-key": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
      "dev": true
    },
    "path-type": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
      "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
      "dev": true,
      "requires": {
        "pify": "2.3.0"
      },
      "dependencies": {
        "pify": {
          "version": "2.3.0",
          "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
          "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
          "dev": true
        }
      }
    },
    "pbkdf2": {
      "version": "3.0.14",
      "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz",
      "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==",
      "dev": true,
      "requires": {
        "create-hash": "1.1.3",
        "create-hmac": "1.1.6",
        "ripemd160": "2.0.1",
        "safe-buffer": "5.1.1",
        "sha.js": "2.4.9"
      }
    },
    "pify": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
      "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
      "dev": true
    },
    "pkg-dir": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
      "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
      "dev": true,
      "requires": {
        "find-up": "2.1.0"
      }
    },
    "preserve": {
      "version": "0.2.0",
      "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
      "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
      "dev": true
    },
    "private": {
      "version": "0.1.8",
      "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
      "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
      "dev": true
    },
    "process": {
      "version": "0.11.10",
      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
      "dev": true
    },
    "process-nextick-args": {
      "version": "1.0.7",
      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
      "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
      "dev": true
    },
    "prr": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
      "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
      "dev": true
    },
    "pseudomap": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
      "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
      "dev": true
    },
    "public-encrypt": {
      "version": "4.0.0",
      "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
      "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
      "dev": true,
      "requires": {
        "bn.js": "4.11.8",
        "browserify-rsa": "4.0.1",
        "create-hash": "1.1.3",
        "parse-asn1": "5.1.0",
        "randombytes": "2.0.5"
      }
    },
    "punycode": {
      "version": "1.4.1",
      "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
      "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
      "dev": true
    },
    "querystring": {
      "version": "0.2.0",
      "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
      "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
      "dev": true
    },
    "querystring-es3": {
      "version": "0.2.1",
      "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
      "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
      "dev": true
    },
    "randomatic": {
      "version": "1.1.7",
      "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
      "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
      "dev": true,
      "requires": {
        "is-number": "3.0.0",
        "kind-of": "4.0.0"
      },
      "dependencies": {
        "is-number": {
          "version": "3.0.0",
          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
          "dev": true,
          "requires": {
            "kind-of": "3.2.2"
          },
          "dependencies": {
            "kind-of": {
              "version": "3.2.2",
              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
              "dev": true,
              "requires": {
                "is-buffer": "1.1.6"
              }
            }
          }
        },
        "kind-of": {
          "version": "4.0.0",
          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
          "dev": true,
          "requires": {
            "is-buffer": "1.1.6"
          }
        }
      }
    },
    "randombytes": {
      "version": "2.0.5",
      "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz",
      "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==",
      "dev": true,
      "requires": {
        "safe-buffer": "5.1.1"
      }
    },
    "randomfill": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz",
      "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==",
      "dev": true,
      "requires": {
        "randombytes": "2.0.5",
        "safe-buffer": "5.1.1"
      }
    },
    "read-pkg": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
      "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
      "dev": true,
      "requires": {
        "load-json-file": "2.0.0",
        "normalize-package-data": "2.4.0",
        "path-type": "2.0.0"
      }
    },
    "read-pkg-up": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
      "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
      "dev": true,
      "requires": {
        "find-up": "2.1.0",
        "read-pkg": "2.0.0"
      }
    },
    "readable-stream": {
      "version": "2.3.3",
      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
      "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
      "dev": true,
      "requires": {
        "core-util-is": "1.0.2",
        "inherits": "2.0.3",
        "isarray": "1.0.0",
        "process-nextick-args": "1.0.7",
        "safe-buffer": "5.1.1",
        "string_decoder": "1.0.3",
        "util-deprecate": "1.0.2"
      }
    },
    "readdirp": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
      "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
      "dev": true,
      "requires": {
        "graceful-fs": "4.1.11",
        "minimatch": "3.0.4",
        "readable-stream": "2.3.3",
        "set-immediate-shim": "1.0.1"
      }
    },
    "regenerate": {
      "version": "1.3.3",
      "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz",
      "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==",
      "dev": true
    },
    "regenerator-runtime": {
      "version": "0.11.1",
      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
      "dev": true
    },
    "regenerator-transform": {
      "version": "0.10.1",
      "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz",
      "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==",
      "dev": true,
      "requires": {
        "babel-runtime": "6.26.0",
        "babel-types": "6.26.0",
        "private": "0.1.8"
      }
    },
    "regex-cache": {
      "version": "0.4.4",
      "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
      "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
      "dev": true,
      "requires": {
        "is-equal-shallow": "0.1.3"
      }
    },
    "regexpu-core": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
      "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=",
      "dev": true,
      "requires": {
        "regenerate": "1.3.3",
        "regjsgen": "0.2.0",
        "regjsparser": "0.1.5"
      }
    },
    "regjsgen": {
      "version": "0.2.0",
      "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
      "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
      "dev": true
    },
    "regjsparser": {
      "version": "0.1.5",
      "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
      "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
      "dev": true,
      "requires": {
        "jsesc": "0.5.0"
      },
      "dependencies": {
        "jsesc": {
          "version": "0.5.0",
          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
          "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
          "dev": true
        }
      }
    },
    "remove-trailing-separator": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
      "dev": true
    },
    "repeat-element": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
      "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
      "dev": true
    },
    "repeat-string": {
      "version": "1.6.1",
      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
      "dev": true
    },
    "repeating": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
      "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
      "dev": true,
      "requires": {
        "is-finite": "1.0.2"
      }
    },
    "require-directory": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
      "dev": true
    },
    "require-main-filename": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
      "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
      "dev": true
    },
    "right-align": {
      "version": "0.1.3",
      "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
      "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
      "dev": true,
      "requires": {
        "align-text": "0.1.4"
      }
    },
    "ripemd160": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
      "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
      "dev": true,
      "requires": {
        "hash-base": "2.0.2",
        "inherits": "2.0.3"
      }
    },
    "safe-buffer": {
      "version": "5.1.1",
      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
      "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
      "dev": true
    },
    "semver": {
      "version": "5.4.1",
      "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
      "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
      "dev": true
    },
    "set-blocking": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
      "dev": true
    },
    "set-immediate-shim": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
      "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
      "dev": true
    },
    "setimmediate": {
      "version": "1.0.5",
      "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
      "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
      "dev": true
    },
    "sha.js": {
      "version": "2.4.9",
      "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz",
      "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==",
      "dev": true,
      "requires": {
        "inherits": "2.0.3",
        "safe-buffer": "5.1.1"
      }
    },
    "shebang-command": {
      "version": "1.2.0",
      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
      "dev": true,
      "requires": {
        "shebang-regex": "1.0.0"
      }
    },
    "shebang-regex": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
      "dev": true
    },
    "signal-exit": {
      "version": "3.0.2",
      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
      "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
      "dev": true
    },
    "slash": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
      "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
      "dev": true
    },
    "source-list-map": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz",
      "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==",
      "dev": true
    },
    "source-map": {
      "version": "0.5.7",
      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
      "dev": true
    },
    "source-map-support": {
      "version": "0.4.18",
      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
      "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
      "dev": true,
      "requires": {
        "source-map": "0.5.7"
      }
    },
    "spdx-correct": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
      "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
      "dev": true,
      "requires": {
        "spdx-license-ids": "1.2.2"
      }
    },
    "spdx-expression-parse": {
      "version": "1.0.4",
      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
      "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
      "dev": true
    },
    "spdx-license-ids": {
      "version": "1.2.2",
      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
      "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
      "dev": true
    },
    "stream-browserify": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
      "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
      "dev": true,
      "requires": {
        "inherits": "2.0.3",
        "readable-stream": "2.3.3"
      }
    },
    "stream-http": {
      "version": "2.7.2",
      "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz",
      "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==",
      "dev": true,
      "requires": {
        "builtin-status-codes": "3.0.0",
        "inherits": "2.0.3",
        "readable-stream": "2.3.3",
        "to-arraybuffer": "1.0.1",
        "xtend": "4.0.1"
      }
    },
    "string-width": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
      "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
      "dev": true,
      "requires": {
        "is-fullwidth-code-point": "2.0.0",
        "strip-ansi": "4.0.0"
      },
      "dependencies": {
        "ansi-regex": {
          "version": "3.0.0",
          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
          "dev": true
        },
        "is-fullwidth-code-point": {
          "version": "2.0.0",
          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
          "dev": true
        },
        "strip-ansi": {
          "version": "4.0.0",
          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
          "dev": true,
          "requires": {
            "ansi-regex": "3.0.0"
          }
        }
      }
    },
    "string_decoder": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
      "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
      "dev": true,
      "requires": {
        "safe-buffer": "5.1.1"
      }
    },
    "strip-ansi": {
      "version": "3.0.1",
      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
      "dev": true,
      "requires": {
        "ansi-regex": "2.1.1"
      }
    },
    "strip-bom": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
      "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
      "dev": true
    },
    "strip-eof": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
      "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
      "dev": true
    },
    "supports-color": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
      "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
      "dev": true
    },
    "tapable": {
      "version": "0.2.8",
      "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",
      "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=",
      "dev": true
    },
    "timers-browserify": {
      "version": "2.0.4",
      "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz",
      "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==",
      "dev": true,
      "requires": {
        "setimmediate": "1.0.5"
      }
    },
    "to-arraybuffer": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
      "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
      "dev": true
    },
    "to-fast-properties": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
      "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
      "dev": true
    },
    "trim-right": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
      "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
      "dev": true
    },
    "tty-browserify": {
      "version": "0.0.0",
      "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
      "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
      "dev": true
    },
    "uglify-js": {
      "version": "2.8.29",
      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
      "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
      "dev": true,
      "requires": {
        "source-map": "0.5.7",
        "uglify-to-browserify": "1.0.2",
        "yargs": "3.10.0"
      },
      "dependencies": {
        "yargs": {
          "version": "3.10.0",
          "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
          "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
          "dev": true,
          "requires": {
            "camelcase": "1.2.1",
            "cliui": "2.1.0",
            "decamelize": "1.2.0",
            "window-size": "0.1.0"
          }
        }
      }
    },
    "uglify-to-browserify": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
      "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
      "dev": true,
      "optional": true
    },
    "uglifyjs-webpack-plugin": {
      "version": "0.4.6",
      "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz",
      "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=",
      "dev": true,
      "requires": {
        "source-map": "0.5.7",
        "uglify-js": "2.8.29",
        "webpack-sources": "1.1.0"
      }
    },
    "url": {
      "version": "0.11.0",
      "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
      "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
      "dev": true,
      "requires": {
        "punycode": "1.3.2",
        "querystring": "0.2.0"
      },
      "dependencies": {
        "punycode": {
          "version": "1.3.2",
          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
          "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
          "dev": true
        }
      }
    },
    "util": {
      "version": "0.10.3",
      "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
      "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
      "dev": true,
      "requires": {
        "inherits": "2.0.1"
      },
      "dependencies": {
        "inherits": {
          "version": "2.0.1",
          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
          "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
          "dev": true
        }
      }
    },
    "util-deprecate": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
      "dev": true
    },
    "validate-npm-package-license": {
      "version": "3.0.1",
      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
      "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
      "dev": true,
      "requires": {
        "spdx-correct": "1.0.2",
        "spdx-expression-parse": "1.0.4"
      }
    },
    "vm-browserify": {
      "version": "0.0.4",
      "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
      "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
      "dev": true,
      "requires": {
        "indexof": "0.0.1"
      }
    },
    "watchpack": {
      "version": "1.4.0",
      "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz",
      "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=",
      "dev": true,
      "requires": {
        "async": "2.6.0",
        "chokidar": "1.7.0",
        "graceful-fs": "4.1.11"
      }
    },
    "webpack": {
      "version": "3.10.0",
      "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz",
      "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==",
      "dev": true,
      "requires": {
        "acorn": "5.2.1",
        "acorn-dynamic-import": "2.0.2",
        "ajv": "5.5.1",
        "ajv-keywords": "2.1.1",
        "async": "2.6.0",
        "enhanced-resolve": "3.4.1",
        "escope": "3.6.0",
        "interpret": "1.1.0",
        "json-loader": "0.5.7",
        "json5": "0.5.1",
        "loader-runner": "2.3.0",
        "loader-utils": "1.1.0",
        "memory-fs": "0.4.1",
        "mkdirp": "0.5.1",
        "node-libs-browser": "2.1.0",
        "source-map": "0.5.7",
        "supports-color": "4.5.0",
        "tapable": "0.2.8",
        "uglifyjs-webpack-plugin": "0.4.6",
        "watchpack": "1.4.0",
        "webpack-sources": "1.1.0",
        "yargs": "8.0.2"
      },
      "dependencies": {
        "supports-color": {
          "version": "4.5.0",
          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
          "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
          "dev": true,
          "requires": {
            "has-flag": "2.0.0"
          }
        }
      }
    },
    "webpack-sources": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz",
      "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==",
      "dev": true,
      "requires": {
        "source-list-map": "2.0.0",
        "source-map": "0.6.1"
      },
      "dependencies": {
        "source-map": {
          "version": "0.6.1",
          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
          "dev": true
        }
      }
    },
    "which": {
      "version": "1.3.0",
      "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
      "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
      "dev": true,
      "requires": {
        "isexe": "2.0.0"
      }
    },
    "which-module": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
      "dev": true
    },
    "window-size": {
      "version": "0.1.0",
      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
      "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
      "dev": true
    },
    "wordwrap": {
      "version": "0.0.2",
      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
      "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
      "dev": true
    },
    "wrap-ansi": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
      "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
      "dev": true,
      "requires": {
        "string-width": "1.0.2",
        "strip-ansi": "3.0.1"
      },
      "dependencies": {
        "string-width": {
          "version": "1.0.2",
          "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
          "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
          "dev": true,
          "requires": {
            "code-point-at": "1.1.0",
            "is-fullwidth-code-point": "1.0.0",
            "strip-ansi": "3.0.1"
          }
        }
      }
    },
    "xtend": {
      "version": "4.0.1",
      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
      "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
      "dev": true
    },
    "y18n": {
      "version": "3.2.1",
      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
      "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
      "dev": true
    },
    "yallist": {
      "version": "2.1.2",
      "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
      "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
      "dev": true
    },
    "yargs": {
      "version": "8.0.2",
      "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
      "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
      "dev": true,
      "requires": {
        "camelcase": "4.1.0",
        "cliui": "3.2.0",
        "decamelize": "1.2.0",
        "get-caller-file": "1.0.2",
        "os-locale": "2.1.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.1.1",
        "which-module": "2.0.0",
        "y18n": "3.2.1",
        "yargs-parser": "7.0.0"
      },
      "dependencies": {
        "camelcase": {
          "version": "4.1.0",
          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
          "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
          "dev": true
        },
        "cliui": {
          "version": "3.2.0",
          "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
          "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
          "dev": true,
          "requires": {
            "string-width": "1.0.2",
            "strip-ansi": "3.0.1",
            "wrap-ansi": "2.1.0"
          },
          "dependencies": {
            "string-width": {
              "version": "1.0.2",
              "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
              "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
              "dev": true,
              "requires": {
                "code-point-at": "1.1.0",
                "is-fullwidth-code-point": "1.0.0",
                "strip-ansi": "3.0.1"
              }
            }
          }
        }
      }
    },
    "yargs-parser": {
      "version": "7.0.0",
      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
      "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
      "dev": true,
      "requires": {
        "camelcase": "4.1.0"
      },
      "dependencies": {
        "camelcase": {
          "version": "4.1.0",
          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
          "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
          "dev": true
        }
      }
    }
  }
}
assets/gutenberg-esnext/block.js000066600000004150151156027310012771 0ustar00const {
	registerBlockType,
} = wp.blocks;
const { __ } = wp.i18n;
import { ContentFormEditor } from './components/FormEditor.js'

// @TODO think about a method to magically create this list
const content_forms = [
	'contact',
	'newsletter',
	'registration'
];

/**
 * Go through each form type and register a blockType from the given config
 * @TODO maybe create a custom category for OrbitFox only?
 *
 */
content_forms.forEach(function (form, index) {
	let config = window['content_forms_config_for_' + form];

	registerBlockType('content-forms/' + form, {
		title: config.title,
		icon: 'index-card',
		category: 'common',
		type: form,
		keywords: [ __( 'forms' ), __( 'fields' ) ],
		edit: ContentFormEditor,
		// save: props => {return null}
		save: props => {
			const component = this
			const {attributes} = props
			const {fields} = attributes
			let fieldsEl = []

			if ( typeof attributes.uid === "undefined" ) {
				attributes.uid = props.id
			}

			_.each(fields, function (args, key) {

				fieldsEl.push(<p
						key={key}
						className="content-form-field-label"
						data-field_id={args.field_id}
						data-label={args.label}
						data-field_type={args.type}
						data-requirement={args.requirement ? "true": "false"}
					/>)
			})

			return (<div key="content-form-fields" className={"content-form-fields content-form-" + form} data-uid={props.id}>
				{fieldsEl}
			</div>)
		}

		// @TODO Maybe return to the old way of saving a plain html
		// save: props => {
		// 	const {
		// 		className,
		// 		attributes
		// 	} = props;
		//
		// 	let elements = [];
		//
		// 	_.each(config.fields, function (args, key) {
		// 		let fieldset_element = <fieldset key={key}>
		// 			<label htmlFor={key}>{attributes[key]}</label>
		// 			<input type="text" name={key} />
		// 		</fieldset>;
		// 		elements.push(fieldset_element)
		// 	});
		//
		// 	// Add a submit button; @TODO Make a setting for this;
		// 	elements.push(<button key="submit_btn">Submit</button>);
		//
		// 	return (
		// 		<form className={ props.className } method="post" action={submitAction}>
		// 			{elements}
		// 		</form>
		// 	);
		// }
	});
});

assets/gutenberg-esnext/components/FormEditor.js000066600000007370151156027310016145 0ustar00/**
 * WordPress dependencies
 */
// import { map } from 'lodash';
const {Component} = wp.element;
const {Placeholder, Spinner, withAPIData, FormToggle} = wp.components;
const {__} = wp.i18n;
const {
	Editable,
	BlockEdit,
	InspectorControls
} = wp.blocks;

const fieldStyle = {
	width: '40%',
	display: 'inline-block'
}

const fieldStyleR = {
	width: '10%',
	display: 'inline-block',
	textAlign: 'right'
}

class FormEditor extends Component {
	constructor() {
		super(...arguments);
		this.form_type = this.props.name.replace('content-forms/', '')
		this.config = window['content_forms_config_for_' + this.form_type]
	}

	render() {
		const component = this
		const { attributes, setAttributes, focus } = this.props
		const {fields} = attributes
		const placeholderEl = <Placeholder key="form-loader" icon="admin-post" label={__('Form')}>
			<Spinner/>
		</Placeholder>
		let controlsEl = []
		let fieldsEl = []

		_.each(component.config.controls, function (args, key) {

			controlsEl.push(<div key={key}>
				<BlockEdit key={'block-edit-custom-' + key}/>
				<InspectorControls.TextControl
					key={key}
					label={args.label}
					value={attributes[key] || ''}
					onFocus={ f => {
						console.log(f)
					}}
					onChange={value => {
						let newValues = {}
						newValues[key] = value
						setAttributes(newValues)
					}}
				/>
			</div>)
		})

		_.each(fields, function (args, key) {
			let val = ''
			let field_id = args.field_id
			let field_config = component.config.fields[field_id]
			let isRequired = false

			if (typeof args.label === "object") {
				val = args.label[0]
			} else if (typeof args.label === "string") {
				val = [args.label]
			}

			if (typeof args.requirement !== "undefined") {
				isRequired = args.requirement
			}

			const focusOn = 'field-' + field_id

			fieldsEl.push(<div key={key} style={{border: '1px solid #333', padding: '5px', margin: '5px', borderRadius: '8px'}} className="content-form-field">

				<fieldset style={fieldStyle}>
					<Editable
						value={val}
						tagName="label"
						placeholder={__('Label for ') + field_id}
						className="content-form-field-label"
						onChange={(value) => {
							let newValues = attributes.fields
							newValues[key]['label'] = value
							setAttributes({fields: newValues})
							component.forceUpdate()
						}}/>
				</fieldset>

				<fieldset style={fieldStyle}>
					<select
						name="field-type-select"
						value={typeof args['type'] !== "undefined" ? args['type'] : 'text'}
						onChange={(event) => {
							let newValues = attributes.fields
							newValues[key]['type'] = event.target.selected
							setAttributes({fields: newValues})
							component.forceUpdate()
						}}>
						<option value="text" key="text">text</option>
						<option value="textarea" key="textarea">textarea</option>
						<option value="password" key="password">password</option>
						<option value="email" key="email">email</option>
						<option value="number" key="number">number</option>
					</select>
				</fieldset>

				<fieldset style={fieldStyleR}>
					<FormToggle
						checked={isRequired}
						showHint={false}
						onChange={(event) => {
							let newValues = attributes.fields
							newValues[key]['requirement'] = event.target.checked
							setAttributes({fields: newValues})
							component.forceUpdate()
						}}
					/>
				</fieldset>

			</div>)
		})

		return [
			focus && (<InspectorControls key="inspector">
				<h3>{__('Form Settings')}</h3>
				{controlsEl}
			</InspectorControls>),
			(<div key="fields" className={'fields ' + component.props.className} data-uid={attributes.uid}>
				{(fieldsEl === [])
					? placeholderEl
					: fieldsEl}
			</div>)
		]
	}
}

export const ContentFormEditor = withAPIData(() => {
	return {
		ContentForm: '/content-forms/v1/forms',
	};
})(FormEditor);
assets/gutenberg-esnext/block.build.js000066600000030113151156027310014065 0ustar00/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_FormEditor_js__ = __webpack_require__(1);
var registerBlockType = wp.blocks.registerBlockType;
var __ = wp.i18n.__;



// @TODO think about a method to magically create this list
var content_forms = ['contact', 'newsletter', 'registration'];

/**
 * Go through each form type and register a blockType from the given config
 * @TODO maybe create a custom category for OrbitFox only?
 *
 */
content_forms.forEach(function (form, index) {
	var _this = this;

	var config = window['content_forms_config_for_' + form];

	registerBlockType('content-forms/' + form, {
		title: config.title,
		icon: 'index-card',
		category: 'common',
		type: form,
		keywords: [__('forms'), __('fields')],
		edit: __WEBPACK_IMPORTED_MODULE_0__components_FormEditor_js__["a" /* ContentFormEditor */],
		// save: props => {return null}
		save: function save(props) {
			var component = _this;
			var attributes = props.attributes;
			var fields = attributes.fields;

			var fieldsEl = [];

			if (typeof attributes.uid === "undefined") {
				attributes.uid = props.id;
			}

			_.each(fields, function (args, key) {

				fieldsEl.push(wp.element.createElement('p', {
					key: key,
					className: 'content-form-field-label',
					'data-field_id': args.field_id,
					'data-label': args.label,
					'data-field_type': args.type,
					'data-requirement': args.requirement ? "true" : "false"
				}));
			});

			return wp.element.createElement(
				'div',
				{ key: 'content-form-fields', className: "content-form-fields content-form-" + form, 'data-uid': props.id },
				fieldsEl
			);
		}

		// @TODO Maybe return to the old way of saving a plain html
		// save: props => {
		// 	const {
		// 		className,
		// 		attributes
		// 	} = props;
		//
		// 	let elements = [];
		//
		// 	_.each(config.fields, function (args, key) {
		// 		let fieldset_element = <fieldset key={key}>
		// 			<label htmlFor={key}>{attributes[key]}</label>
		// 			<input type="text" name={key} />
		// 		</fieldset>;
		// 		elements.push(fieldset_element)
		// 	});
		//
		// 	// Add a submit button; @TODO Make a setting for this;
		// 	elements.push(<button key="submit_btn">Submit</button>);
		//
		// 	return (
		// 		<form className={ props.className } method="post" action={submitAction}>
		// 			{elements}
		// 		</form>
		// 	);
		// }
	});
});

/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ContentFormEditor; });
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * WordPress dependencies
 */
// import { map } from 'lodash';
var Component = wp.element.Component;
var _wp$components = wp.components,
    Placeholder = _wp$components.Placeholder,
    Spinner = _wp$components.Spinner,
    withAPIData = _wp$components.withAPIData,
    FormToggle = _wp$components.FormToggle;
var __ = wp.i18n.__;
var _wp$blocks = wp.blocks,
    Editable = _wp$blocks.Editable,
    BlockEdit = _wp$blocks.BlockEdit,
    InspectorControls = _wp$blocks.InspectorControls;


var fieldStyle = {
	width: '40%',
	display: 'inline-block'
};

var fieldStyleR = {
	width: '10%',
	display: 'inline-block',
	textAlign: 'right'
};

var FormEditor = function (_Component) {
	_inherits(FormEditor, _Component);

	function FormEditor() {
		_classCallCheck(this, FormEditor);

		var _this = _possibleConstructorReturn(this, (FormEditor.__proto__ || Object.getPrototypeOf(FormEditor)).apply(this, arguments));

		_this.form_type = _this.props.name.replace('content-forms/', '');
		_this.config = window['content_forms_config_for_' + _this.form_type];
		return _this;
	}

	_createClass(FormEditor, [{
		key: 'render',
		value: function render() {
			var component = this;
			var _props = this.props,
			    attributes = _props.attributes,
			    setAttributes = _props.setAttributes,
			    focus = _props.focus;
			var fields = attributes.fields;

			var placeholderEl = wp.element.createElement(
				Placeholder,
				{ key: 'form-loader', icon: 'admin-post', label: __('Form') },
				wp.element.createElement(Spinner, null)
			);
			var controlsEl = [];
			var fieldsEl = [];

			_.each(component.config.controls, function (args, key) {

				controlsEl.push(wp.element.createElement(
					'div',
					{ key: key },
					wp.element.createElement(BlockEdit, { key: 'block-edit-custom-' + key }),
					wp.element.createElement(InspectorControls.TextControl, {
						key: key,
						label: args.label,
						value: attributes[key] || '',
						onFocus: function onFocus(f) {
							console.log(f);
						},
						onChange: function onChange(value) {
							var newValues = {};
							newValues[key] = value;
							setAttributes(newValues);
						}
					})
				));
			});

			_.each(fields, function (args, key) {
				var val = '';
				var field_id = args.field_id;
				var field_config = component.config.fields[field_id];
				var isRequired = false;

				if (_typeof(args.label) === "object") {
					val = args.label[0];
				} else if (typeof args.label === "string") {
					val = [args.label];
				}

				if (typeof args.requirement !== "undefined") {
					isRequired = args.requirement;
				}

				var focusOn = 'field-' + field_id;

				fieldsEl.push(wp.element.createElement(
					'div',
					{ key: key, style: { border: '1px solid #333', padding: '5px', margin: '5px', borderRadius: '8px' }, className: 'content-form-field' },
					wp.element.createElement(
						'fieldset',
						{ style: fieldStyle },
						wp.element.createElement(Editable, {
							value: val,
							tagName: 'label',
							placeholder: __('Label for ') + field_id,
							className: 'content-form-field-label',
							onChange: function onChange(value) {
								var newValues = attributes.fields;
								newValues[key]['label'] = value;
								setAttributes({ fields: newValues });
								component.forceUpdate();
							} })
					),
					wp.element.createElement(
						'fieldset',
						{ style: fieldStyle },
						wp.element.createElement(
							'select',
							{
								name: 'field-type-select',
								value: typeof args['type'] !== "undefined" ? args['type'] : 'text',
								onChange: function onChange(event) {
									var newValues = attributes.fields;
									newValues[key]['type'] = event.target.selected;
									setAttributes({ fields: newValues });
									component.forceUpdate();
								} },
							wp.element.createElement(
								'option',
								{ value: 'text', key: 'text' },
								'text'
							),
							wp.element.createElement(
								'option',
								{ value: 'textarea', key: 'textarea' },
								'textarea'
							),
							wp.element.createElement(
								'option',
								{ value: 'password', key: 'password' },
								'password'
							),
							wp.element.createElement(
								'option',
								{ value: 'email', key: 'email' },
								'email'
							),
							wp.element.createElement(
								'option',
								{ value: 'number', key: 'number' },
								'number'
							)
						)
					),
					wp.element.createElement(
						'fieldset',
						{ style: fieldStyleR },
						wp.element.createElement(FormToggle, {
							checked: isRequired,
							showHint: false,
							onChange: function onChange(event) {
								var newValues = attributes.fields;
								newValues[key]['requirement'] = event.target.checked;
								setAttributes({ fields: newValues });
								component.forceUpdate();
							}
						})
					)
				));
			});

			return [focus && wp.element.createElement(
				InspectorControls,
				{ key: 'inspector' },
				wp.element.createElement(
					'h3',
					null,
					__('Form Settings')
				),
				controlsEl
			), wp.element.createElement(
				'div',
				{ key: 'fields', className: 'fields ' + component.props.className, 'data-uid': attributes.uid },
				fieldsEl === [] ? placeholderEl : fieldsEl
			)];
		}
	}]);

	return FormEditor;
}(Component);

var ContentFormEditor = withAPIData(function () {
	return {
		ContentForm: '/content-forms/v1/forms'
	};
})(FormEditor);

/***/ })
/******/ ]);assets/gutenberg-esnext/webpack.config.js000066600000002033151156027310014555 0ustar00var webpack = require( 'webpack' ),
	NODE_ENV = process.env.NODE_ENV || 'development';

const entryPointNames = [
	'blocks',
	'components',
	'date',
	'editor',
	'element',
	'i18n',
	'utils',
	'data',
];

const packageNames = [
	'hooks',
];

const externals = {
	react: 'React',
	'react-dom': 'ReactDOM',
	'react-dom/server': 'ReactDOMServer',
	tinymce: 'tinymce',
	moment: 'moment',
	jquery: 'jQuery',
};

[ ...entryPointNames, ...packageNames ].forEach( name => {
	externals[ `@wordpress/${ name }` ] = {
		this: [ 'wp', name ],
	};
} );


var webpackConfig = {
		entry: './block.js',
		output: {
			path: __dirname,
			filename: 'block.build.js',
		},
		externals,
		module: {
			loaders: [
				{
					test: /.js$/,
					loader: 'babel-loader',
					exclude: /node_modules/,
				},
			],
		},
		plugins: [
			new webpack.DefinePlugin( {
				'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
			} ),
		]
	};

if ( 'production' === NODE_ENV ) {
	webpackConfig.plugins.push( new webpack.optimize.UglifyJsPlugin() );
}

module.exports = webpackConfig;
beaver/class-themeisle-content-forms-beaver-registration.php000066600000001202151156027310020351 0ustar00<?php

namespace ThemeIsle\ContentForms;

class BeaverModuleRegistration extends BeaverModule {

	/**
	 * Define the form type
	 * @return string
	 */
	public function get_type() {
		return 'registration';
	}

	public function __construct( $data = array(), $args = null ) {

		parent::__construct(
			array(
				'name'        => esc_html__( 'Registration', 'themeisle-companion' ),
				'description' => esc_html__( 'A sign up form.', 'themeisle-companion' ),
				'category'    => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
				'dir'         => dirname( __FILE__ ),
				'url'         => plugin_dir_url( __FILE__ )
			)
		);
	}
}beaver/includes/frontend.php000066600000002523151156027310012155 0ustar00<?php
/**
 * The module rendering file
 *
 * @$module object
 * @$settings object
 */
$form_settings = apply_filters( 'content_forms_config_for_' . $module->get_type(), array() );

/** == Fields Validation == */
$controls = $form_settings['controls'];

foreach ( $controls as $control_name => $control ) {
	$control_value = $module->get_setting( $control_name );
	if ( isset( $control['required'] ) && $control['required'] && empty( $control_value ) ) { ?>
		<div class="content-forms-required">
			<?php
			printf(
				esc_html__( 'The %s setting is required!', 'themeisle-companion' ),
				'<strong>' . $control['label'] . '</strong>'
			); ?>
		</div>
		<?php
	}
}

/** == FORM HEADER == */
$module->render_form_header( $module->node );

/** == FORM FIELDS == */
$fields = $module->get_setting( 'fields' );

foreach ( $fields as $key => $field ) {
	$module->render_form_field( (array)$field );
}

$controls = $form_settings['controls'];

/** == FORM SUBMIT BUTTON == */
$btn_label = esc_html__( 'Submit', 'themeisle-companion' );

if ( ! empty( $settings->submit_label ) ) {
	$btn_label = $settings->submit_label;
} ?>
<fieldset>
	<button type="submit" name="submit" value="submit-<?php echo $module->get_type(); ?>-<?php echo $module->node; ?>">
		<?php echo $btn_label; ?>
	</button>
</fieldset>
<?php

/** == FORM FOOTER == */
$module->render_form_footer();beaver/includes/frontend.css.php000066600000000023151156027310012735 0ustar00<?php
// wait a secbeaver/class-themeisle-content-forms-beaver-newsletter.php000066600000001206151156027310020037 0ustar00<?php

namespace ThemeIsle\ContentForms;

class BeaverModuleNewsletter extends BeaverModule {

	/**
	 * Define the form type
	 * @return string
	 */
	public function get_type() {
		return 'newsletter';
	}

	public function __construct( $data = array(), $args = null ) {

		parent::__construct(
			array(
				'name'        => esc_html__( 'Newsletter', 'themeisle-companion' ),
				'description' => esc_html__( 'A simple newsletter form.', 'themeisle-companion' ),
				'category'    => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
				'dir'         => dirname( __FILE__ ),
				'url'         => plugin_dir_url( __FILE__ )
			)
		);
	}
}beaver/class-themeisle-content-forms-beaver-base.php000066600000017605151156027310016567 0ustar00<?php

namespace ThemeIsle\ContentForms;

/**
 * This class is used to create an Beaver module based on a ContentForms config
 * Class BeaverModule
 * @package ThemeIsle\ContentForms
 */
abstract class BeaverModule extends \FLBuilderModule {

	public $name;

	protected $title;

	public $icon;

	protected $forms_config = array();

	public function __construct( $data ) {

		$this->setup_attributes();

		parent::__construct( $data );

		wp_enqueue_script( 'content-forms' );
		wp_enqueue_style( 'content-forms' );
	}

	public function register_widget() {
		$fields = array();

		foreach ( $this->forms_config['fields'] as $key => $field ) {
			$fields[] = array(
				'key'      => $key,
				'label'    => isset( $field['default'] ) ? $field['default'] : '',
				'type'     => $field['type'],
				'required' => $field['require'],
			);
		}

		$controls = array();

		if ( ! empty( $this->forms_config['controls'] ) ) {
			foreach ( $this->forms_config['controls'] as $key => $control ) {
				$control_settings = array(
					'type'        => $control['type'],
					'label'       => $control['label'],
					'description' => isset( $control['description'] ) ? $control['description'] : '',
					'default'     => isset( $control['default'] ) ? $control['default'] : '',
				);

				if ( isset( $control['options'] ) ) {
					$control_settings['options'] = $control['options'];
				}

				$controls[ $key ] = $control_settings;
			}
		}

		$args = array(
			'general' => array( // Tab
				'title'       => $this->get_title(),
				'description' => isset( $this->forms_config['description'] ) ? $this->forms_config['description'] : '',
				'sections'    => array(),
			)
		);

		// is important to keep the order of fields from the main config
		foreach ( $this->forms_config as $key => $val ) {
			if ( 'fields' === $key ) {
				$args['general']['sections']['settings'] = array(
					'title'  => esc_html__( 'Fields', 'themeisle-companion' ),
					'fields' => array(
						'fields' => array(
							'multiple'     => true,
							'type'         => 'form',
							'label'        => esc_html__( 'Field', 'themeisle-companion' ),
							'form'         => 'field',
							'preview_text' => 'label',
							'default'      => $fields
						),
					),
				);
				continue;
			} elseif ( 'controls' === $key ) {
				$args['general']['sections']['controls'] = array(
					'title'  => esc_html__( 'Form Settings', 'themeisle-companion' ),
					'fields' => $controls
				);
			}
		}

		\FLBuilder::register_module( get_called_class(), $args );

		\FLBuilder::register_settings_form(
			'field', array(
				'title' => esc_html__( 'Field', 'themeisle-companion' ),
				'tabs'  => array(
					'general' => array(
						'title'    => esc_html__( 'Field', 'themeisle-companion' ),
						'sections' => array(
							'fields' => array(
								'title'  => esc_html__( 'Field', 'themeisle-companion' ),
								'fields' => array(
									'label'    => array(
										'type'  => 'text',
										'label' => esc_html__( 'Label', 'themeisle-companion' ),
									),
									'type'     => array(
										'type'    => 'select',
										'label'   => esc_html__( 'Type', 'themeisle-companion' ),
										'options' => array(
											'text'     => esc_html__( 'Text', 'themeisle-companion' ),
											'email'     => esc_html__( 'Email', 'themeisle-companion' ),
											'textarea' => esc_html__( 'Textarea', 'themeisle-companion' ),
											'password' => esc_html__( 'Password', 'themeisle-companion' ),
										)
									),
									'required' => array(
										'type'    => 'select',
										'label'   => esc_html__( 'Is required?', 'themeisle-companion' ),
										'options' => array(
											'required' => esc_html__( 'Required', 'themeisle-companion' ),
											'optional' => esc_html__( 'Optional', 'themeisle-companion' )
										)
									)
								),
							),
						),
					),
				),
			)
		);
	}

	/**
	 * This method takes the given attributes and sets them as properties
	 *
	 * @param $data array
	 */
	public function setup_attributes( $data = array() ) {

		if ( ! empty( $data['content_forms_config'] ) ) {
			$this->forms_config = $data['content_forms_config'];
		} else {
			$this->forms_config = apply_filters( 'content_forms_config_for_' . $this->get_type(), $this->forms_config );
		}

		if ( ! empty( $data['id'] ) ) {
			$this->set_name( $data['id'] );
		}

		if ( ! empty( $this->forms_config['title'] ) ) {
			$this->set_title( $this->forms_config['title'] );
		}

		if ( ! empty( $this->forms_config['icon'] ) ) {
			$this->set_icon( $this->forms_config['icon'] );
		}
	}

	/**
	 * Each inherited class will need to define it's type be returning it trough this method
	 * @return mixed
	 */
	abstract public function get_type();

	/**
	 * Retrieve the widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return $this->name;
	}

	/**
	 * Set the widget name property
	 *
	 * @param $name
	 */
	protected function set_name( $name ) {
		$this->name = $name;
	}

	/**
	 * Retrieve the widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return $this->title;
	}

	/**
	 * Set the widget title property
	 */
	protected function set_title( $title ) {
		$this->title = $title;
	}

	/**
	 * Retrieve content form widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
//	public function get_icon() {
//		return $this->icon;
//	}

	/**
	 * Set the widget title property
	 */
	protected function set_icon( $icon ) {
		$this->icon = $icon;
	}

	/** == Render functions == */

	/**
	 * Render the header of the form based on the block id(for JS identification)
	 *
	 * @param $id
	 */
	public function render_form_header( $id ) {
		$url = admin_url( 'admin-post.php' );
		echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->get_type() . '">';

		wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->get_type() );

		echo '<input type="hidden" name="action" value="content_form_submit" />';
		// there could be also the possibility to submit by type
		// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
		echo '<input type="hidden" name="form-type" value="' . $this->get_type() . '" />';
		echo '<input type="hidden" name="form-builder" value="beaver" />';
		echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
		echo '<input type="hidden" name="form-id" value="' . $id . '" />';
	}

	public function render_form_field( $field ) {
		$key      = ! empty( $field['key'] ) ? $field['key'] : sanitize_title( $field['label'] );
		$required = '';
		$form_id  = $this->node;


		if ( $field['required'] === 'required' ) {
			$required = 'required="required"';
		}

		$field_name = 'data[' . $form_id . '][' . $key . ']'; ?>
		<fieldset class="content-form-field-<?php echo $field['type'] ?>">

			<label for="<?php echo $field_name ?>">
				<?php echo $field['label']; ?>
			</label>

			<?php
			switch ( $field['type'] ) {
				case 'textarea': ?>
					<textarea name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $required; ?>
						      cols="30" rows="5"></textarea>
					<?php break;
				case 'password': ?>
					<input type="password" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $required; ?>>
					<?php break;
				default: ?>
					<input type="text" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $required; ?>>
					<?php
					break;
			} ?>
		</fieldset>
		<?php
	}

	public function render_form_footer() {
		echo '</form>';
	}

	/**
	 * Retrieve a setting value for a given key
	 *
	 * @param $key
	 *
	 * @return bool|mixed
	 */
	public function get_setting( $key ) {
		if ( ! empty( $this->settings->{$key} ) ) {
			return $this->settings->{$key};
		}

		return false;
	}
}beaver/class-themeisle-content-forms-beaver-contact.php000066600000001125151156027310017276 0ustar00<?php

namespace ThemeIsle\ContentForms;

class BeaverModuleContact extends BeaverModule {

	/**
	 * Define the form type
	 * @return string
	 */
	public function get_type() {
		return 'contact';
	}

	public function __construct() {

		parent::__construct(
			array(
				'name'        => esc_html__( 'Contact', 'themeisle-companion' ),
				'description' => esc_html__( 'A contact form.', 'themeisle-companion' ),
				'category'    => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
				'dir'         => dirname( __FILE__ ),
				'url'         => plugin_dir_url( __FILE__ )
			)
		);
	}

}class-themeisle-content-forms-gutenberg.php000066600000016012151156027310015120 0ustar00<?php

namespace ThemeIsle\ContentForms;


/**
 * This class is used to create a Gutenberg block based on a ContentForms config
 * Class ContentFormsGutenbergModule
 * @TODO This is a work in progress and for now we will start from the basisc example of a Gutenberg block.
 */
class GutenbergModule {

	private $name;

	private $form_type;

	private $title;

	private $icon;

	private $forms_config = array();

	public function __construct( $data ) {

		$this->setup_attributes( $data );
		$this->gutenberg_register_attributes();
		add_action( 'enqueue_block_editor_assets', array( $this, 'gutenberg_enqueue_block_editor_assets' ) );
	}

	/**
	 * This method takes the given attributes and sets them as properties
	 *
	 * @param $data array
	 */
	private function setup_attributes( $data ) {
		$this->form_type = $data['type'];

		if ( ! empty( $data['content_forms_config'] ) ) {
			$this->forms_config = $data['content_forms_config'];
		} else {
			$this->forms_config = apply_filters( 'content_forms_config_for_' . $this->form_type, $this->forms_config );
		}

		if ( ! empty( $data['id'] ) ) {
			$this->set_name( $data['id'] );
		}

		if ( ! empty( $this->forms_config['title'] ) ) {
			$this->set_title( $this->forms_config['title'] );
		}

		if ( ! empty( $this->forms_config['icon'] ) ) {
			$this->set_icon( $this->forms_config['icon'] );
		}
	}

	/**
	 * Load our block generator once but for each type of form we need to localize the config
	 */
	function gutenberg_enqueue_block_editor_assets() {

		if ( ! wp_script_is( 'gutenberg-content-forms' ) ) {

			wp_enqueue_script(
				'gutenberg-content-forms',
				plugins_url( './assets/gutenberg-esnext/block.build.js', __FILE__ ),
				array( 'wp-blocks', 'wp-i18n', 'wp-element', 'underscore' ),
				filemtime( plugin_dir_path( __FILE__ ) . './assets/gutenberg-esnext/block.build.js' )
			);
		}

		wp_localize_script(
			'gutenberg-content-forms',
			'content_forms_config_for_' . $this->form_type,
			$this->forms_config
		);
	}

	function gutenberg_enqueue_block_assets() {
		wp_enqueue_style(
			'gutenberg-examples-05',
			plugins_url( 'style.css', __FILE__ ),
			array( 'wp-blocks' ),
			filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
		);
	}

	function render_block( $attributes, $content ) {
		$form_content = '';
		$uid          = $attributes['uid'];
		$fields       = $attributes['fields'];
		wp_enqueue_script( 'content-forms' );

		$form_header = $this->render_form_header( $uid );
		$form_footer = $this->render_form_footer();


		$btn_label = esc_html__( 'Submit', 'themeisle-companion' );
		ob_start();
		if ( ! empty( $attributes['submit_label'] ) ) {
			$btn_label = $attributes['submit_label'];
		} ?>
		<fieldset>
			<button type="submit" name="submit" value="submit-<?php echo $this->getFormType(); ?>-<?php echo $uid; ?>">
				<?php echo $btn_label; ?>
			</button>
		</fieldset>
		<?php

		$form_submit = ob_get_clean();

		foreach ( $fields as $key => $field ) {
			ob_start(); ?>
			<fields>
				<label for="<?php echo $key; ?>"><?php echo $field['label']; ?></label>
				<input type="text" name="<?php echo $key; ?>">
			</fields>
			<?php
			$form_content .= ob_get_clean();
		}

		$block_content = sprintf(
			'<div class="content-form-fields" data-uid="%1$s">
<h3>%1$s</h3>
%2$s
%3$s
%4$s
%5$s
</div>',
			$uid,
			$form_header,
			$form_content,
			$form_submit,
			$form_footer
		);

		return $block_content;
	}

	public function render_form_header( $id ) {
		// create an url for the form's action
		$url = admin_url( 'admin-post.php' );

		ob_start();

		echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->getFormType() . ' ' . $this->get_name() . '">';

		wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->getFormType() );

		echo '<input type="hidden" name="action" value="content_form_submit" />';
		// there could be also the possibility to submit by type
		// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
		echo '<input type="hidden" name="form-type" value="' . $this->getFormType() . '" />';
		echo '<input type="hidden" name="form-builder" value="gutenberg" />';
		echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
		echo '<input type="hidden" name="form-id" value="' . $id . '" />';

		return ob_get_clean();
	}

	public function render_form_footer() {
		return '</form>';
	}

	function gutenberg_register_attributes() {
		$gutenberg_args = array(
			'attributes'      => array(
				'uid'    => array(
					'type'      => 'string',
					'selector'  => '.content-form-fields',
					'source'    => 'attribute',
					'attribute' => 'data-uid'
				),
				'fields' => array(
					'type'     => 'array',
					'source'   => 'query',
					'selector' => '.content-form-field-label',
					'query'    => array(
						'field_id'    => array(
							'type'      => 'string',
							'source'    => 'attribute',
							'attribute' => 'data-field_id'
						),
						'label'       => array(
							'type'      => 'string',
							'source'    => 'attribute',
							'attribute' => 'data-label'
						),
						'requirement' => array(
							'type'      => 'string',
							'source'    => 'attribute',
							'attribute' => 'data-requirement'
						),
						'type'        => array(
							'type'      => 'string',
							'source'    => 'attribute',
							'attribute' => 'data-field_type'
						),
					),
					'default'  => array(),
				),
			),
			'render_callback' => array( $this, 'render_block' ),
		);

		// Create form settings
		foreach ( $this->forms_config['controls'] as $name => $control ) {
			$gutenberg_args['attributes'][ $name ] = array(
				'type'    => 'string',
				'default' => isset( $control['default'] ) ? $control['default'] : '',
			);
		}

		foreach ( $this->forms_config['fields'] as $name => $field ) {
			$gutenberg_args['attributes']['fields']['default'][ $name ] = array(
				'field_id'    => $name,
				'label'       => $field['label'],
				'type'        => $field['type'],
				'requirement' => ( $field['require'] === 'required' ) ? 'true' : 'false',
			);
		}

		register_block_type( 'content-forms/' . $this->form_type, $gutenberg_args );
	}

	/**
	 * Retrieve the widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return $this->name;
	}

	/**
	 * Set the widget name property
	 */
	private function set_name( $name ) {
		$this->name = $name;
	}

	/**
	 * Retrieve the widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return $this->title;
	}

	/**
	 * Set the widget title property
	 */
	private function set_title( $title ) {
		$this->title = $title;
	}

	/**
	 * Retrieve content form widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return $this->icon;
	}

	/**
	 * Set the widget title property
	 */
	private function set_icon( $icon ) {
		$this->icon = $icon;
	}

	private function getFormType() {
		return $this->form_type;
	}
}class-themeisle-content-forms-newsletter.php000066600000016112151156027310015333 0ustar00<?php

namespace ThemeIsle\ContentForms;

use ThemeIsle\ContentForms\ContentFormBase as Base;

/**
 * Class NewsletterForm
 * @package ThemeIsle\ContentForms
 */
class NewsletterForm extends Base {

	/**
	 * @var NewsletterForm
	 */
	public static $instance = null;

	/**
	 * The Call To Action
	 */
	public function init() {
		$this->set_type( 'newsletter' );

		$this->notices = array(
			'success' => esc_html__( 'Welcome to our newsletter!', 'themeisle-companion' ),
			'error'   => esc_html__( 'Action failed!', 'themeisle-companion' ),
		);
	}

	/**
	 * Create an abstract array config which should define the form.
	 *
	 * @param $config
	 *
	 * @return array
	 */
	public function make_form_config( $config ) {
		return array(
			'id'                           => 'newsletter',
			'icon'                         => 'eicon-align-left',
			'title'                        => esc_html__( 'Newsletter Form', 'themeisle-companion' ),

			'controls' => array(
				'provider'     => array(
					'type'        => 'select',
					'label'       => esc_html__( 'Subscribe to', 'themeisle-companion' ),
					'description' => esc_html__( 'Where to send the email?', 'themeisle-companion' ),
					'options'     => array(
						'mailchimp'  => esc_html__( 'MailChimp', 'themeisle-companion' ),
						'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' )
					)
				),
				'access_key'   => array(
					'type'        => 'text',
					'label'       => esc_html__( 'Access Key', 'themeisle-companion' ),
					'description' => esc_html__( 'Provide an access key for the selected service', 'themeisle-companion' ),
					'required' => true
				),
				'list_id'      => array(
					'type'  => 'text',
					'label' => esc_html__( 'List ID', 'themeisle-companion' ),
					'description' => esc_html__( 'The List ID (based on the seleced service) where we should subscribe the user', 'themeisle-companion' ),
					'required' => true
				),
				'submit_label' => array(
					'type'    => 'text',
					'label'   => esc_html__( 'Submit Label', 'themeisle-companion' ),
					'default' => esc_html__( 'Join Newsletter', 'themeisle-companion' ),
				)
			),

			'fields' => array(
				'email' => array(
					'type'        => 'email',
					'label'       => esc_html__( 'Email', 'themeisle-companion' ),
					'default'     => esc_html__( 'Email', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
					'require'     => 'required'
				)
			),

		);
	}

	/**
	 * This method is passed to the rest controller and it is responsible for submitting the data.
	 *
	 * @param $return array
	 * @param $data array Must contain the following keys: `email` but it can also have extra keys
	 * @param $widget_id string
	 * @param $post_id string
	 * @param $builder string
	 *
	 * @return mixed
	 */
	public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {

		if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
			$return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );

			return $return;
		}

		$email = $data['email'];

		// prepare settings for submit
		$settings = $this->get_widget_settings( $widget_id, $post_id, $builder );

		$provider = 'mailchimp';

		if ( ! empty( $settings['provider'] ) ) {
			$provider = $settings['provider'];
		}

		$providerArgs = array();

		if ( empty( $settings['access_key'] ) || empty( $settings['list_id'] ) ) {
			$return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'themeisle-companion' );

			return $return;
		}

		$providerArgs['access_key'] = $settings['access_key'];
		$providerArgs['list_id']    = $settings['list_id'];

		$return = $this->_subscribe_mail( $return, $email, $provider, $providerArgs );

		return $return;
	}

	/**
	 * Subscribe the given email to the given provider; either mailchimp or sendinblue.
	 *
	 * @param $result
	 * @param $email
	 * @param string $provider
	 * @param array $provider_args
	 *
	 * @return bool|array
	 */
	private function _subscribe_mail( $result, $email, $provider = 'mailchimp', $provider_args = array() ) {

		$api_key = $provider_args['access_key'];
		$list_id = $provider_args['list_id'];

		switch ( $provider ) {

			case 'mailchimp':
				// add a pending subscription for the user to confirm
				$status = 'pending';

				$args = array(
					'method'  => 'PUT',
					'headers' => array(
						'Authorization' => 'Basic ' . base64_encode( 'user:' . $api_key )
					),
					'body'    => json_encode( array(
						'email_address' => $email,
						'status'        => $status
					) )
				);

				$url = 'https://' . substr( $api_key, strpos( $api_key, '-' ) + 1 ) . '.api.mailchimp.com/3.0/lists/' . $list_id . '/members/' . md5( strtolower( $email ) );

				$response = wp_remote_post( $url, $args );

				if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
					return $response;
				}

				$body = json_decode( wp_remote_retrieve_body( $response ), true );

				if ( $body->status == $status ) {
					$result['success'] = true;
					$result['msg']     = $this->notices['success'];
				} else {
					$result['success'] = false;
					$result['msg']    = $this->notices['error'];
				}

				return $result;
				break;
			case 'sendinblue':

				$url = 'https://api.sendinblue.com/v3/contacts';

				$args = array(
					'method'  => 'POST',
					'headers' => array(
						'content-type' => 'application/json',
						'api-key'      => $api_key
					),
					'body'    => json_encode( array(
						'email'            => $email,
						'listIds'          => array( (int) $list_id ),
						'emailBlacklisted' => false,
						'smsBlacklisted'   => false,
					) )
				);

				$response = wp_remote_post( $url, $args );

				if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {

					$body = json_decode( wp_remote_retrieve_body( $response ), true );

					if ( ! empty( $body['message'] ) ) {
						$result['msg'] = $body['message'];
					} else {
						$result['msg'] = $response;
					}

					return $result;
				}

				$result['success'] = true;
				$result['msg']     = $this->notices['success'];

				return $result;
				break;

			default;
				break;
		}

		return false;
	}

	/**
	 * @static
	 * @since 1.0.0
	 * @access public
	 * @return NewsletterForm
	 */
	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
			self::$instance->init();
		}

		return self::$instance;
	}

	/**
	 * Throw error on object clone
	 *
	 * The whole idea of the singleton design pattern is that there is a single
	 * object therefore, we don't want the object to be cloned.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __clone() {
		// Cloning instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}

	/**
	 * Disable unserializing of the class
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __wakeup() {
		// Unserializing instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}
}class-themeisle-content-forms-elementor.php000066600000104406151156027310015135 0ustar00<?php

namespace ThemeIsle\ContentForms;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}


use \Elementor\Controls_Manager as Controls_Manager;
use \Elementor\Scheme_Typography as Scheme_Typography;
use \Elementor\Scheme_Color as Scheme_Color;
use \Elementor\Group_Control_Typography as Group_Control_Typography;
use Elementor\Group_Control_Border as Group_Control_Border;
/**
 * This class is used to create an Elementor widget based on a ContentForms config.
 * @package ThemeIsle\ContentForms
 */
class ElementorWidget extends \Elementor\Widget_Base {

	private $name;

	private $title;

	private $icon;

	private $form_type;

	private $forms_config = array();

	/**
	 * Widget base constructor.
	 *
	 * Initializing the widget base class.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @param array $data Widget data. Default is an empty array.
	 * @param array|null $args Optional. Widget default arguments. Default is null.
	 */
	public function __construct( $data = array(), $args = null ) {
		parent::__construct( $data, $args );
		$this->setup_attributes( $data );
	}

	/**
	 * This method takes the given attributes and sets them as properties
	 *
	 * @param $data array
	 */
	private function setup_attributes( $data ) {

		$this->setFormType();

		if ( ! empty( $data['content_forms_config'] ) ) {
			$this->setFormConfig( $data['content_forms_config'] );
		} else {
			$this->setFormConfig( apply_filters( 'content_forms_config_for_' . $this->getFormType(), $this->getFormConfig() ) );
		}

		if ( ! empty( $data['id'] ) ) {
			$this->set_name( $data['id'] );
		}

		if ( ! empty( $this->forms_config['title'] ) ) {
			$this->set_title( $this->forms_config['title'] );
		}

		if ( ! empty( $this->forms_config['icon'] ) ) {
			$this->set_icon( $this->forms_config['icon'] );
		}
	}

	/**
	 * Register widget controls.
	 *
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since 1.0.0
	 * @access protected
	 */
	protected function _register_controls() {
		// first we need to make sure that we have some fields to build on
		if ( empty( $this->forms_config['fields'] ) ) {
			return;
		}

		// is important to keep the order of fields from the main config
		foreach ( $this->forms_config as $key => $val ) {
			if ( 'fields' === $key ) {
				$this->_register_fields_controls();
				continue;
			} elseif ( 'controls' === $key ) {
				$this->_register_settings_controls();
			}
		}
	}

	/**
	 * Add alignment control for newsletter form
	 */
	protected function add_newsletter_form_alignment() {

		if ( $this->getFormType() !== 'newsletter' ) {
			return;
		}

		$this->add_responsive_control(
			'align_submit',
			[
				'label' => __( 'Alignment', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'toggle' => false,
				'default' => 'flex-start',
				'options' => [
					'flex-start' => [
						'title' => __( 'Left', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-left',
					],
					'center' => [
						'title' => __( 'Center', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-center',
					],
					'flex-end' => [
						'title' => __( 'Right', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-right',
					],
				],
				'selectors' => [
					'{{WRAPPER}} .content-form.content-form-newsletter' => 'justify-content: {{VALUE}};',
				],
			]
		);
	}

	/**
	 * Add alignment control for button
	 */
	protected function add_submit_button_align() {
		if ( $this->getFormType() === 'newsletter' ) {
			return;
		}

		$this->add_responsive_control(
			'align_submit',
			[
				'label' => __( 'Alignment', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'toggle' => false,
				'default' => 'left',
				'options' => [
					'left' => [
						'title' => __( 'Left', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-left',
					],
					'center' => [
						'title' => __( 'Center', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-center',
					],
					'right' => [
						'title' => __( 'Right', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-right',
					],
				],
				'selectors' => [
					'{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
				],
			]
		);
	}

	// Style section
	protected function _register_settings_controls() {
		$this->start_controls_section(
			'section_form_settings',
			array(
				'label' => __( 'Form Settings', 'elementor-addon-widgets', 'themeisle-companion' ),
			)
		);

		$controls = $this->forms_config['controls'];

		foreach ( $controls as $control_name => $control ) {

			$control_args = array(
				'label'   => $control['label'],
				'type'    => $control['type'],
				'default' => isset( $control['default'] ) ? $control['default'] : '',
			);

			if ( isset( $control['options'] ) ) {
				$control_args['options'] = $control['options'];
			}

			$this->add_control(
				$control_name,
				$control_args
			);
		}

		$this->add_newsletter_form_alignment();

		$this->add_submit_button_align();

		$this->end_controls_section();

		$this->add_style_controls();
	}

	protected function add_style_controls() {
		$this->start_controls_section(
			'section_form_style',
			[
				'label' => __( 'Form', 'elementor-addon-widgets', 'themeisle-companion' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

		$this->add_control(
			'column_gap',
			[
				'label' => __( 'Columns Gap', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SLIDER,
				'default' => [
					'size' => 10,
				],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 60,
					],
				],
				'selectors' => [
					'{{WRAPPER}} .elementor-column' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
					'{{WRAPPER}} .content-form .submit-form' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
				],
			]
		);

		$this->add_control(
			'row_gap',
			[
				'label' => __( 'Rows Gap', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SLIDER,
				'default' => [
					'size' => 10,
				],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 60,
					],
				],
				'selectors' => [
					'{{WRAPPER}} .elementor-column' => 'margin-bottom: {{SIZE}}{{UNIT}};',
					'{{WRAPPER}} .content-form .submit-form' => 'margin-bottom: {{SIZE}}{{UNIT}};',
				],
			]
		);

		$this->add_control(
			'heading_label',
			[
				'label' => __( 'Label', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::HEADING,
				'separator' => 'before',
			]
		);

		$this->add_control(
			'label_spacing',
			[
				'label' => __( 'Spacing', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SLIDER,
				'default' => [
					'size' => 0,
				],
				'range' => [
					'px' => [
						'min' => 0,
						'max' => 60,
					],
				],
				'selectors' => [
					'body.rtl {{WRAPPER}} fieldset > label' => 'padding-left: {{SIZE}}{{UNIT}};',
					// for the label position = inline option
					'body:not(.rtl) {{WRAPPER}} fieldset > label' => 'padding-right: {{SIZE}}{{UNIT}};',
					// for the label position = inline option
					'body {{WRAPPER}} fieldset > label' => 'padding-bottom: {{SIZE}}{{UNIT}};',
					// for the label position = above option
				],
			]
		);

		$this->add_control(
			'label_color',
			[
				'label' => __( 'Text Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > label, {{WRAPPER}} .elementor-field-subgroup label' => 'color: {{VALUE}};',
				],
				'scheme' => [
					'type' => Scheme_Color::get_type(),
					'value' => Scheme_Color::COLOR_3,
				],
			]
		);

		$this->add_control(
			'mark_required_color',
			[
				'label' => __( 'Mark Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'default' => '',
				'selectors' => [
					'{{WRAPPER}} .required-mark' => 'color: {{COLOR}};',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name' => 'label_typography',
				'selector' => '{{WRAPPER}} fieldset > label',
				'scheme' => Scheme_Typography::TYPOGRAPHY_3,
			]
		);
		$this->end_controls_section();

		$this->start_controls_section(
			'section_field_style',
			[
				'label' => __( 'Field', 'elementor-addon-widgets', 'themeisle-companion' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name' => 'field_typography',
				'selector' => '{{WRAPPER}} fieldset > input, {{WRAPPER}} fieldset > textarea, {{WRAPPER}} fieldset > button',
				'scheme' => Scheme_Typography::TYPOGRAPHY_3,
			]
		);

		$this->add_responsive_control(
			'align_field_text',
			[
				'label' => __( 'Text alignment', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => \Elementor\Controls_Manager::CHOOSE,
				'toggle' => false,
				'default' => 'left',
				'options' => [
					'left' => [
						'title' => __( 'Left', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-left',
					],
					'center' => [
						'title' => __( 'Center', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-center',
					],
					'right' => [
						'title' => __( 'Right', 'elementor-addon-widgets', 'themeisle-companion' ),
						'icon' => 'fa fa-align-right',
					],
				],
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'text-align: {{VALUE}}',
					'{{WRAPPER}} fieldset > textarea' => 'text-align: {{VALUE}}'
				],
			]
		);

		$this->add_responsive_control(
		        'field-text-padding', [
				'label' => __( 'Text Padding', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					'{{WRAPPER}} fieldset > textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
        );

		$this->start_controls_tabs( 'tabs_field_style' );

		$this->start_controls_tab(
			'tab_field_normal',
			[
				'label' => __( 'Normal', 'elementor-addon-widgets', 'themeisle-companion' ),
			]
		);

		$this->add_control(
			'field_text_color',
			[
				'label' => __( 'Text Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'color: {{VALUE}};',
					'{{WRAPPER}} fieldset > input::placeholder' => 'color: {{VALUE}};',
                    '{{WRAPPER}} fieldset > textarea' => 'color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea::placeholder' => 'color: {{VALUE}};',
				],
				'scheme' => [
					'type' => Scheme_Color::get_type(),
					'value' => Scheme_Color::COLOR_3,
				],
			]
		);



		$this->add_control(
			'field_background_color',
			[
				'label' => __( 'Background Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'default' => '#ffffff',
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'background-color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea' => 'background-color: {{VALUE}};',
				],
				'separator' => 'before',
			]
		);

		$this->add_control(
			'field_border_color',
			[
				'label' => __( 'Border Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'border-color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea' => 'border-color: {{VALUE}};',
				],
				'separator' => 'before',
			]
		);

		$this->add_control(
		        'field_border_style',
            [
				'label' => _x( 'Border Type', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SELECT,
				'options' => [
					'' => __( 'None', 'elementor-addon-widgets', 'themeisle-companion' ),
					'solid' => _x( 'Solid', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'double' => _x( 'Double', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'dotted' => _x( 'Dotted', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'dashed' => _x( 'Dashed', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'groove' => _x( 'Groove', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
				],
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'border-style: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea' => 'border-style: {{VALUE}};'
				],
            ]
        );

		$this->add_control(
			'field_border_width',
			[
				'label' => __( 'Border Width', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'placeholder' => '',
				'size_units' => [ 'px' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					'{{WRAPPER}} fieldset > textarea' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->add_control(
			'field_border_radius',
			[
				'label' => __( 'Border Radius', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					'{{WRAPPER}} fieldset > textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->end_controls_tab();

		$this->start_controls_tab(
			'tab_field_focus',
			[
				'label' => __( 'Focus', 'elementor-addon-widgets', 'themeisle-companion' ),
			]
		);

		$this->add_control(
			'field_focus_text_color',
			[
				'label' => __( 'Text Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'color: {{VALUE}};',
					'{{WRAPPER}} fieldset > input::placeholder:focus' => 'color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea::placeholder:focus' => 'color: {{VALUE}};',
				],
				'scheme' => [
					'type' => Scheme_Color::get_type(),
					'value' => Scheme_Color::COLOR_3,
				],
			]
		);

		$this->add_control(
			'field_focus_background_color',
			[
				'label' => __( 'Background Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'default' => '#ffffff',
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'background-color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'background-color: {{VALUE}};',
				],
				'separator' => 'before',
			]
		);

		$this->add_control(
			'field_focus_border_color',
			[
				'label' => __( 'Border Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'border-color: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'border-color: {{VALUE}};',
				],
				'separator' => 'before',
			]
		);

		$this->add_control(
			'field_focus_border_style',
			[
				'label' => _x( 'Border Type', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SELECT,
				'options' => [
					'' => __( 'None', 'elementor-addon-widgets', 'themeisle-companion' ),
					'solid' => _x( 'Solid', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'double' => _x( 'Double', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'dotted' => _x( 'Dotted', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'dashed' => _x( 'Dashed', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
					'groove' => _x( 'Groove', 'Border Control', 'elementor-addon-widgets', 'themeisle-companion' ),
				],
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'border-style: {{VALUE}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'border-style: {{VALUE}};'
				],
			]
		);

		$this->add_control(
			'field_focus_border_width',
			[
				'label' => __( 'Border Width', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'placeholder' => '',
				'size_units' => [ 'px' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->add_control(
			'field_focus_border_radius',
			[
				'label' => __( 'Border Radius', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > input:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
					'{{WRAPPER}} fieldset > textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->end_controls_section();

		$this->start_controls_section(
			'section_button_style',
			[
				'label' => __( 'Button', 'elementor-addon-widgets', 'themeisle-companion' ),
				'tab' => Controls_Manager::TAB_STYLE,
			]
		);

		$this->start_controls_tabs( 'tabs_button_style' );

		$this->start_controls_tab(
			'tab_button_normal',
			[
				'label' => __( 'Normal', 'elementor-addon-widgets', 'themeisle-companion' ),
			]
		);

		$this->add_control(
			'button_background_color',
			[
				'label' => __( 'Background Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'scheme' => [
					'type' => Scheme_Color::get_type(),
					'value' => Scheme_Color::COLOR_4,
				],
				'selectors' => [
					'{{WRAPPER}} fieldset > button' => 'background-color: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'button_text_color',
			[
				'label' => __( 'Text Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'default' => '',
				'selectors' => [
					'{{WRAPPER}} fieldset > button' => 'color: {{VALUE}};',
				],
			]
		);

		$this->add_group_control(
			Group_Control_Typography::get_type(),
			[
				'name' => 'button_typography',
				'scheme' => Scheme_Typography::TYPOGRAPHY_4,
				'selector' => '{{WRAPPER}} fieldset > button',
			]
		);

		$this->add_group_control(
			Group_Control_Border::get_type(), [
				'name' => 'button_border',
				'placeholder' => '1px',
				'default' => '1px',
				'selector' => '{{WRAPPER}} fieldset > button',
				'separator' => 'before',
			]
		);

		$this->add_control(
			'button_border_radius',
			[
				'label' => __( 'Border Radius', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', '%' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->add_control(
			'button_text_padding',
			[
				'label' => __( 'Text Padding', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::DIMENSIONS,
				'size_units' => [ 'px', 'em', '%' ],
				'selectors' => [
					'{{WRAPPER}} fieldset > button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
			]
		);

		$this->end_controls_tab();

		$this->start_controls_tab(
			'tab_button_hover',
			[
				'label' => __( 'Hover', 'elementor-addon-widgets', 'themeisle-companion' ),
			]
		);

		$this->add_control(
			'button_background_hover_color',
			[
				'label' => __( 'Background Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > button:hover' => 'background-color: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'button_hover_color',
			[
				'label' => __( 'Text Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > button:hover' => 'color: {{VALUE}};',
				],
			]
		);

		$this->add_control(
			'button_hover_border_color',
			[
				'label' => __( 'Border Color', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::COLOR,
				'selectors' => [
					'{{WRAPPER}} fieldset > button:hover' => 'border-color: {{VALUE}};',
				],
				'condition' => [
					'button_border_border!' => '',
				],
			]
		);

		$this->end_controls_tab();

		$this->end_controls_tabs();

		$this->end_controls_section();
	}
//End style section
	protected function _register_fields_controls() {

		$this->start_controls_section(
			$this->form_type . '_form_fields',
			array( 'label' => __( 'Fields', 'elementor-addon-widgets', 'themeisle-companion' ) )
		);

		$repeater = new \Elementor\Repeater();

		$repeater->add_control(
			'label',
			array(
				'label'   => __( 'Label', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'    => \Elementor\Controls_Manager::TEXT,
				'default' => '',
			)
		);

		$repeater->add_control(
			'placeholder',
			array(
				'label'   => __( 'Placeholder', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'    => \Elementor\Controls_Manager::TEXT,
				'default' => '',
			)
		);

		$repeater->add_control(
			'requirement',
			array(
				'label'   => __( 'Required', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'    => \Elementor\Controls_Manager::SWITCHER,
				'return_value' => 'required',
				'default' => '',
			)
		);

		$field_types = array(
			'text'     => __( 'Text', 'elementor-addon-widgets', 'themeisle-companion' ),
			'password' => __( 'Password', 'elementor-addon-widgets', 'themeisle-companion' ),
//			'tel'      => __( 'Tel', 'textdomain' ),
			'email'    => __( 'Email', 'elementor-addon-widgets', 'themeisle-companion' ),
			'textarea' => __( 'Textarea', 'elementor-addon-widgets', 'themeisle-companion' ),
//			'number'   => __( 'Number', 'textdomain' ),
//			'select'   => __( 'Select', 'textdomain' ),
//			'url'      => __( 'URL', 'textdomain' ),
		);

		$repeater->add_control(
			'type',
			array(
				'label'   => __( 'Type', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'    => \Elementor\Controls_Manager::SELECT,
				'options' => $field_types,
				'default' => 'text'
			)
		);

		$repeater->add_control(
			'key',
			array(
				'label' => __( 'Key', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'  => \Elementor\Controls_Manager::HIDDEN
			)
		);

		$repeater->add_responsive_control(
			'field_width',
			[
				'label' => __( 'Field Width', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type' => Controls_Manager::SELECT,
				'options' => [
					'100' => '100%',
					'75' => '75%',
					'66' => '66%',
					'50' => '50%',
					'33' => '33%',
					'25' => '25%',
				],
				'default' => '100',
			]
		);

		$fields = $this->forms_config['fields'];

		$default_fields = array();

		foreach ( $fields as $field_name => $field ) {
			$default_fields[] = array(
				'key'         => $field_name,
				'type'        => $field['type'],
				'label'       => $field['label'],
				'requirement' => $field['require'],
				'placeholder' => isset( $field['placeholder'] ) ? $field['placeholder'] : $field['label'],
				'field_width' => '100',
			);
		}

		$this->add_control(
			'form_fields',
			array(
				'label'       => __( 'Form Fields', 'elementor-addon-widgets', 'themeisle-companion' ),
				'type'        => \Elementor\Controls_Manager::REPEATER,
				'show_label'  => false,
				'separator'   => 'before',
				'fields'      => array_values( $repeater->get_controls() ),
				'default'     => $default_fields,
				'title_field' => '{{{ label }}}',
			)
		);

		if( $this->form_type === 'newsletter') {

			$this->add_control(
				'button_icon',
				[
					'label' => __( 'Submit Icon', 'elementor-pro', 'themeisle-companion' ),
					'type' => Controls_Manager::ICON,
					'label_block' => true,
					'default' => '',
				]
			);

			$this->add_control(
				'button_icon_indent',
				[
					'label' => __( 'Icon Spacing', 'elementor-pro', 'themeisle-companion' ),
					'type' => Controls_Manager::SLIDER,
					'range' => [
						'px' => [
							'max' => 100,
						],
					],
					'condition' => [
						'button_icon!' => '',
					],
					'selectors' => [
						'{{WRAPPER}} .elementor-button-icon' => 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};',
					],
				]
			);

		}


		$this->end_controls_section();
	}

	/**
	 * Render content form widget output on the frontend.
	 *
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since 1.0.0
	 * @access protected
	 */
	protected function render( $instance = array() ) {
		$form_id  = $this->get_data( 'id' );
		$settings = $this->get_settings();
		$instance = $this->get_settings();

		$this->maybe_load_widget_style();

		if ( empty( $this->forms_config['fields'] ) ) {
			return;
		}

		$fields = $settings['form_fields'];

		$controls = $this->forms_config['controls'];

		foreach ( $controls as $control_name => $control ) {
			$control_value = '';

			if ( isset( $settings[ $control_name ] ) ) {
				$control_value = $settings[ $control_name ];
			}
			if ( isset( $control['required'] ) && $control['required'] && empty( $control_value ) ) { ?>
                <div class="content-forms-required">
					<?php
					printf(
						esc_html__( 'The %s setting is required!', 'elementor-addon-widgets', 'themeisle-companion' ),
						'<strong>' . $control['label'] . '</strong>'
					); ?>
                </div>
				<?php
			}
		}

		$this->render_form_header( $form_id );
		foreach ( $fields as $index => $field ) {
			$this->render_form_field( $field );
		}

		$btn_label = esc_html__( 'Submit', 'elementor-addon-widgets', 'themeisle-companion' );

		if ( ! empty( $controls['submit_label'] ) ) {
			$btn_label = $this->get_settings( 'submit_label' );
		} ?>
        <fieldset class="submit-form <?php echo $this->form_type; ?>">
            <button type="submit" name="submit" value="submit-<?php echo $this->form_type; ?>-<?php echo $form_id;
            ?>" class="<?php $this->get_render_attribute_string( 'button' ); ?>">
	            <?php echo $btn_label; ?>
                <?php if ( ! empty( $instance['button_icon'] ) ){ ?><span <?php echo
                $this->get_render_attribute_string( 'content-wrapper' ); // TODO: what to do about content-wrapper ?>

                                <span <?php echo $this->get_render_attribute_string( 'icon-align' ); ?>>
									<i class="<?php echo esc_attr( $instance['button_icon'] ); ?>"></i>
								</span>
							<?php }; ?>
            </button>
        </fieldset>
		<?php

		$this->render_form_footer();
	}

	/**
	 * Either enqueue the widget style registered by the library
	 * or load an inline version for the preview only
	 */
	protected function maybe_load_widget_style() {
		if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
            <style>
                <?php echo file_get_contents( plugin_dir_path( __FILE__ ) . '/assets/content-forms.css' ) ?>
            </style>
			<?php
		} else {
			// if `themeisle_content_forms_register_default_style` is false, the style won't be registered anyway
			wp_enqueue_script( 'content-forms' );
			wp_enqueue_style( 'content-forms' );
		}
	}

	/**
	 * Display method for the form's header
	 * It is also takes care about the form attributes and the regular hidden fields
	 *
	 * @param $id
	 */
	private function render_form_header( $id ) {
		// create an url for the form's action
		$url = admin_url( 'admin-post.php' );

		echo '<form action="' . esc_url( $url ) . '" method="post" name="content-form-' . $id . '" id="content-form-' . $id . '" class="content-form content-form-' . $this->getFormType() . ' ' . $this->get_name() . '">';

		wp_nonce_field( 'content-form-' . $id, '_wpnonce_' . $this->getFormType() );

		echo '<input type="hidden" name="action" value="content_form_submit" />';
		// there could be also the possibility to submit by type
		// echo '<input type="hidden" name="action" value="content_form_{type}_submit" />';
		echo '<input type="hidden" name="form-type" value="' . $this->getFormType() . '" />';
		echo '<input type="hidden" name="form-builder" value="elementor" />';
		echo '<input type="hidden" name="post-id" value="' . get_the_ID() . '" />';
		echo '<input type="hidden" name="form-id" value="' . $id . '" />';
	}

	/**
	 * Display method for the form's footer
	 */
	private function render_form_footer() {
		echo '</form>';
	}

	/**
	 * Print the output of an individual field
	 *
	 * @param $field
	 * @param bool $is_preview
	 */
	private function render_form_field( $field, $is_preview = false ) {
		$item_index = $field['_id'];
		$key        = ! empty( $field['key'] ) ? $field['key'] : sanitize_title( $field['label'] );
		$placeholder        = ! empty( $field['placeholder'] ) ? $field['placeholder'] : '';

		$required   = '';
		$form_id    = $this->get_data( 'id' );

		if ( $field['requirement'] === 'required' ) {
			$required = 'required="required"';
		}

//		 in case this is a preview, we need to disable the actual inputs and transform the labels in inputs
		$disabled = '';
		if ( $is_preview ) {
			$disabled = 'disabled="disabled"';
		}

		$field_name = 'data[' . $form_id . '][' . $key . ']';

		$this->add_render_attribute( 'fieldset' . $field['_id'], 'class',  'content-form-field-' . $field['type'] );
		$this->add_render_attribute( 'fieldset' . $field['_id'], 'class', 'elementor-column elementor-col-' . $field['field_width'] );
		$this->add_render_attribute( ['icon-align' => [
			'class' => [
				empty( $instance['button_icon_align'] ) ? '' :
					'elementor-align-icon-' . $instance['button_icon_align'],
				'elementor-button-icon',
			],
		]] );

		$this->add_inline_editing_attributes( $item_index . '_label', 'none' );
		?>


        <fieldset <?php echo $this->get_render_attribute_string( 'fieldset' . $field['_id'] ); ?>>

            <label for="<?php echo $field_name ?>"
				<?php echo $this->get_render_attribute_string( 'label' . $item_index ); ?>>
				<?php echo $field['label'];
				if ($field['requirement']==='required'){
				    echo '<span class="required-mark"> *</span>';
                }
				?>
            </label>

			<?php
			switch ( $field['type'] ) {
				case 'textarea': ?>
                    <textarea name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $disabled; ?>
						<?php echo $required; ?>
                              placeholder="<?php echo esc_attr ( $placeholder ); ?>"
                              cols="30" rows="5"></textarea>
					<?php break;
				case 'password': ?>
                    <input type="password" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $required; ?> <?php echo $disabled; ?>>
					<?php break;
				default: ?>
                    <input type="text" name="<?php echo $field_name ?>" id="<?php echo $field_name ?>"
						<?php echo $required; ?> <?php echo $disabled; ?> placeholder="<?php echo esc_attr ( $placeholder ); ?>">
					<?php
					break;
			} ?>
        </fieldset>
		<?php
	}

	/**
	 * Retrieve the widget name.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget name.
	 */
	public function get_name() {
		return $this->name;
	}

	/**
	 * Set the widget name property
	 */
	private function set_name( $name ) {
		$this->name = $name;
	}

	private function setFormType() {
		$this->form_type = $this->get_data( 'widgetType' );

		if ( empty( $this->form_type ) ) {
			$this->form_type = $this->get_data( 'id' );
		}

		$this->form_type = str_replace( 'content_form_', '', $this->form_type );
	}

	private function setFormConfig( $config ) {
		$this->forms_config = $config;
	}

	private function getFormConfig( $field = null ) {

		if ( isset( $field ) ) {

			if ( isset( $this->forms_config[ $field ] ) ) {
				return $this->forms_config[ $field ];
			}

			return false;
		}

		return $this->forms_config;
	}

	private function getFormType() {
		return $this->form_type;
	}

	/**
	 * Retrieve the widget title.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget title.
	 */
	public function get_title() {
		return $this->title;
	}

	/**
	 * Set the widget title property
	 */
	private function set_title( $title ) {
		$this->title = $title;
	}

	/**
	 * Retrieve content form widget icon.
	 *
	 * @since 1.0.0
	 * @access public
	 *
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return $this->icon;
	}

	/**
	 * Set the widget title property
	 */
	private function set_icon( $icon ) {
		$this->icon = $icon;
	}

	/**
	 * Widget Category.
	 *
	 * @return array
	 */
	public function get_categories() {
		$category_args = apply_filters( 'content_forms_category_args', array() );
		$slug = isset( $category_args['slug'] ) ?  $category_args['slug'] : 'obfx-elementor-widgets';
		return [ $slug ];
	}

	/**
	 * Extract widget settings based on a widget id and a page id
	 *
	 * @param $post_id
	 * @param $widget_id
	 *
	 * @return bool
	 */
	static function get_widget_settings( $widget_id, $post_id ) {

		$el_data = \Elementor\Plugin::$instance->db->get_plain_editor( $post_id );
		$el_data = apply_filters( 'elementor/frontend/builder_content_data', $el_data, $post_id );

		if ( ! empty( $el_data ) ) {
			return self::get_widget_data_by_id( $widget_id, $el_data );
		}

		return $el_data;
	}

	/**
	 * Recursively look through Elementor data and extract the settings for a specific
	 *
	 * @param $widget_id
	 * @param $el_data
	 *
	 * @return bool
	 */
	static function get_widget_data_by_id( $widget_id, $el_data ) {

		if ( ! empty( $el_data ) ) {
			foreach ( $el_data as $el ) {

				if ( $el['elType'] === 'widget' && $el['id'] === $widget_id ) {
					return $el;
				} elseif ( ! empty( $el['elements'] ) ) {
					$el = self::get_widget_data_by_id( $widget_id, $el['elements'] );

					if ( $el ) {
						return $el;
					}
				}
			}
		}

		return false;
	}
}class-themeisle-content-forms-registration.php000066600000013763151156027310015662 0ustar00<?php

namespace ThemeIsle\ContentForms;

use ThemeIsle\ContentForms\ContentFormBase as Base;

/**
 * Class RegistrationForm
 * @package ThemeIsle\ContentForms
 */
class RegistrationForm extends Base {

	/**
	 * @var RegistrationForm
	 */
	public static $instance = null;

	/**
	 * The Call To Action
	 */
	public function init() {
		$this->set_type( 'registration' );

		$this->notices = array(
			'success' => esc_html__( 'Your message has been sent!', 'themeisle-companion' ),
			'error'   => esc_html__( 'We failed to send your message!', 'themeisle-companion' ),
		);
	}

	/**
	 * Create an abstract array config which should define the form.
	 *
	 * @param $config
	 *
	 * @return array
	 */
	public function make_form_config( $config ) {

		return array(
			'id'    => $this->get_type(),
			'icon'  => 'eicon-align-left',
			'title' => esc_html__( 'User Registration Form', 'themeisle-companion' ),

			'fields' => array(
				'username' => array(
					'type'        => 'text',
					'label'       => esc_html__( 'User Name', 'themeisle-companion' ),
					'default'     => esc_html__( 'User Name', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'User Name', 'themeisle-companion' ),
					'require'     => 'required',
					'validation'  => ''// name a function which should allow only letters and numbers
				),
				'email'    => array(
					'type'        => 'email',
					'label'       => esc_html__( 'Email', 'themeisle-companion' ),
					'default'     => esc_html__( 'Email', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
					'require'     => 'required'
				),
				'password' => array(
					'type'        => 'password',
					'label'       => esc_html__( 'Password', 'themeisle-companion' ),
					'default'     => esc_html__( 'Password', 'themeisle-companion' ),
					'placeholder' => esc_html__( 'Password', 'themeisle-companion' ),
					'require'     => 'required'
				)
			),

			'controls' => array(
				'submit_label' => array(
					'type'        => 'text',
					'label'       => esc_html__( 'Submit', 'themeisle-companion' ),
					'default'     => esc_html__( 'Register', 'themeisle-companion' ),
					'description' => esc_html__( 'The Call To Action label', 'themeisle-companion' )
				)
			)
		);
	}

	/**
	 * This method is passed to the rest controller and it is responsible for submitting the data.
	 * // @TODO we still have to check for the requirement with the field settings
	 *
	 * @param $return array
	 * @param $data array Must contain the following keys: `email`, `name` but it can also have extra keys
	 * @param $widget_id string
	 * @param $post_id string
	 * @param $builder string
	 *
	 * @return mixed
	 */
	public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {

		if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
			$return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );

			return $return;
		}

		$email = sanitize_email( $data['email'] );

		unset( $data['email'] );

		if ( empty( $data['username'] ) ) {
			$username = $email;
		} else {
			$username = sanitize_user( $data['username'] );
		}

		unset( $data['username'] );

		// if there is no password we will auto-generate one
		$password = null;

		if ( ! empty( $data['password'] ) ) {
			$password = $data['password'];
			unset( $data['password'] );
		}

		$return = $this->_register_user( $return, $email, $username, $password, $data );

		return $return;
	}

	/**
	 * Add a new user for the given details
	 *
	 * @param array $return
	 * @param string $user_email
	 * @param string $user_name
	 * @param null $password
	 * @param array $extra_data
	 *
	 * @return array mixed
	 */
	private function _register_user( $return, $user_email, $user_name, $password = null, $extra_data = array() ) {

		if ( ! get_option( 'users_can_register' ) ) {
			$return['msg'] = esc_html__( 'This website does not allow registrations at this moment!', 'themeisle-companion' );

			return $return;
		}

		if ( ! validate_username( $user_name ) ) {
			$return['msg'] = esc_html__( 'Invalid user name', 'themeisle-companion' );

			return $return;
		}

		if ( username_exists( $user_name ) ) {
			$return['msg'] = esc_html__( 'Username already exists', 'themeisle-companion' );

			return $return;
		}

		if ( email_exists( $user_email ) ) {
			$return['msg'] = esc_html__( 'This email is already registered', 'themeisle-companion' );
			return $return;
		}

		// no pass? ok
		if ( empty( $password ) ) {
			$password = wp_generate_password(
				$length = 12,
				$include_standard_special_chars = false
			);
		}

		$userdata = array(
			'user_login' => $user_name,
			'user_email' => $user_email,
			'user_pass'  => $password
		);

		$user_id = wp_insert_user( $userdata );

		if ( ! is_wp_error( $user_id ) ) {

			if ( ! empty( $extra_data ) ) {
				foreach ( $extra_data as $key => $value ) {
					update_user_meta( $user_id, sanitize_title( $key ), sanitize_text_field( $value ) );
				}
			}

			$return['success'] = true;
			$return['msg']     = esc_html__( 'Welcome, ', 'themeisle-companion' ) . $user_name;
		}

		return $return;
	}


	/**
	 * @static
	 * @since 1.0.0
	 * @access public
	 * @return RegistrationForm
	 */
	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
			self::$instance->init();
		}

		return self::$instance;
	}

	/**
	 * Throw error on object clone
	 *
	 * The whole idea of the singleton design pattern is that there is a single
	 * object therefore, we don't want the object to be cloned.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __clone() {
		// Cloning instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}

	/**
	 * Disable unserializing of the class
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __wakeup() {
		// Unserializing instances of the class is forbidden.
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
	}
}index.php000066600000000101151156027310006361 0ustar00<?php
/**
 * @package ThemeIsle\ContentForms
 * Ignore this.
 */
composer.json000066600000001053151156027310007272 0ustar00{
  "name": "codeinwp/themeisle-content-forms",
  "version": "1.2.0",
  "description": "ThemeIsle Content Forms ",
  "keywords": [
    "wordpress"
  ],
  "homepage": "https://github.com/Codeinwp/themeisle-content-forms",
  "license": "GPL-2.0-or-later",
  "authors": [
    {
      "name": "ThemeIsle team",
      "email": "friends@themeisle.com",
      "homepage": "https://themeisle.com"
    }
  ],
  "autoload": {
    "files": [
      "load.php"
    ]
  },
  "support": {
    "issues": "https://github.com/Codeinwp/themeisle-content-forms/issues"
  }
}
LICENSE000066600000104505151156027310005563 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.