diff --git a/.env b/.env
new file mode 100644
index 00000000..b38051d2
--- /dev/null
+++ b/.env
@@ -0,0 +1,2 @@
+MONGO_HUDOZKA_PASSWORD=h123
+HUDOZKA_DB_URI=mongodb://hudozka:h123@mongo:27017/hudozka?authSource=admin
diff --git a/modules/Fetch/config.json5 b/modules/Fetch/config.json5
new file mode 100644
index 00000000..2f7e9e17
--- /dev/null
+++ b/modules/Fetch/config.json5
@@ -0,0 +1,7 @@
+{
+ vk: {
+ appId: '4202466',
+ appSecret: '5NMWIbgb2ImAQeMeODEd'
+ },
+ outputDir: '/Users/tmshv/Yandex.Disk.localized/Hudozka/Site/Events'
+}
\ No newline at end of file
diff --git a/modules/Fetch/fetch.py b/modules/Fetch/fetch.py
new file mode 100644
index 00000000..acdf7c74
--- /dev/null
+++ b/modules/Fetch/fetch.py
@@ -0,0 +1,202 @@
+#!/usr/local/bin/python3
+
+import json
+import os
+import re
+import string
+from datetime import datetime
+from functools import reduce
+from os import makedirs
+
+import json5
+import sys
+
+import requests
+
+from utils import until, copy
+from vk import vk_init, vk_wall_get_by_id, vk_photos_get_albums, vk_photos_get
+
+config = json5.load(open('config.json5', 'r'))
+vk_init(config['vk']['appId'], config['vk']['appSecret'])
+
+pattern = re.compile(r'https?://vk\.com/wall([-\d]+)_(\d+)')
+ms = []
+
+size_priority = ['w', 'z', 'y']
+
+
+# get_album_item = until(size_priority)
+
+
+def get_item_by_size(size, item):
+ for s in item:
+ if s['type'] == size:
+ return s
+
+ return None
+
+
+def get_album_item(item):
+ for s in size_priority:
+ img = get_item_by_size(s, item)
+ if img:
+ return img
+ return None
+
+
+def is_valid_url(i: str):
+ return pattern.match(i) is not None
+
+
+def add_middleware(var: str, fn):
+ ms.append((var, fn))
+
+
+def apply_middleware(data: str, mw: tuple):
+ key, fn = mw
+ value = fn(data)
+ form = {}
+ form[mw[0]] = ''
+ data.format(**form)
+ return data
+
+
+def apply_middlewares(output_dir, template, data):
+ result = template
+ for mw in ms:
+ key, fn = mw
+ form = {key: fn(output_dir, data)}
+ result = string.Template(result)
+ result = result.safe_substitute(**form)
+
+ return result
+
+
+def attach_album(output_dir, data):
+ """
+ {
+ 'size': 13,
+ 'title': 'Каллиграфия 27.11.2016',
+ 'owner_id': -132442859,
+ 'updated': 1480340404,
+ 'description': '',
+ 'id': '238711857',
+ 'thumb': {'user_id': 100, 'access_key': '428f3dad13bdd5d730', 'owner_id': -132442859,
+ 'date': 1480340404,
+ 'photo_807': 'https://pp.vk.me/c837134/v837134463/11056/ZaoO1h5Idaw.jpg',
+ 'id': 456239050,
+ 'width': 1024, 'photo_75': 'https://pp.vk.me/c837134/v837134463/11053/aHOALfgr0VU.jpg',
+ 'photo_130': 'https://pp.vk.me/c837134/v837134463/11054/czcuc7o-bN4.jpg', 'text': '',
+ 'photo_604': 'https://pp.vk.me/c837134/v837134463/11055/P7yUE6WitSA.jpg', 'height': 683,
+ 'photo_1280': 'https://pp.vk.me/c837134/v837134463/11057/eLG5Akgx3fk.jpg',
+ 'album_id': 238711857
+ },
+ 'created': 1480340311
+ }
+ :param data:
+ :return:
+ """
+ oid = data['owner_id']
+ aid = data['id']
+
+ album = vk_photos_get(oid, aid)['response']['items']
+
+ files = []
+ for file in album:
+ img = get_album_item(file['sizes'])
+ if img:
+ files.append(img['src'])
+ # files.append(file['sizes'])
+
+ download_files(files, output_dir)
+ return '\n'.join(list(
+ map(
+ lambda i: '' % i,
+ map(
+ lambda f: os.path.basename(f),
+ files
+ )
+ )
+ ))
+
+
+def get_date(ts: int):
+ date = datetime.fromtimestamp(ts)
+ return date.strftime("%Y.%m.%d")
+
+
+def get_folder_name(post):
+ date_formatted = get_date(post['date'])
+
+ return '{date} vk-{owner_id}-{id}'.format(
+ date=date_formatted,
+ owner_id=post['owner_id'],
+ id=post['id'],
+ )
+
+
+def download_files(files, output):
+ for url in files:
+ file_out = os.path.join(output, os.path.basename(url))
+ req = requests.get(url)
+ data = req.content
+ f = open(file_out, 'wb')
+ f.write(data)
+ f.close()
+
+
+attachment_types = {
+ 'album': attach_album
+}
+
+
+def get_post_attachments(output_dir, data):
+ attachments = []
+ for a in data['attachments']:
+ a_type = a['type']
+ if a_type in attachment_types:
+ fn = attachment_types[a_type]
+
+ attachment = fn(output_dir, a[a_type])
+ attachments.append(attachment)
+
+ return '\n'.join(attachments)
+
+
+if __name__ == '__main__':
+ add_middleware('id', lambda _, data: 'vk-{owner_id}-{id}'.format(
+ owner_id=data['owner_id'],
+ id=data['id'],
+ ))
+
+ add_middleware('date', lambda _, data: get_date(data['date']))
+ add_middleware('text', lambda _, data: data['text'])
+ add_middleware('attachments', get_post_attachments)
+
+ article_file = open('template.md', 'r', encoding='utf-8')
+ article = article_file.read()
+ article_file.close()
+
+ urls = sys.argv[1:]
+ for url in urls:
+ if not is_valid_url(url):
+ raise Exception('Cannot perform URL %s' % url)
+
+ vid = '%s_%s' % pattern.findall(url)[0]
+ res = vk_wall_get_by_id(vid)
+ if 'response' in res:
+ post = res['response'][0]
+
+ if 'copy_history' in post:
+ copy(post['copy_history'][0], post)
+
+ output_dir = os.path.join(config['outputDir'], get_folder_name(post))
+ makedirs(output_dir, exist_ok=True)
+
+ article = apply_middlewares(output_dir, article, post)
+
+ article_file = open(os.path.join(output_dir, 'vk.md'), 'w', encoding='utf-8')
+ article_file.write(article)
+ article_file.close()
+
+ # print(json.dumps(post, indent=4, ensure_ascii=False))
diff --git a/modules/Fetch/template.md b/modules/Fetch/template.md
new file mode 100644
index 00000000..f524bc2e
--- /dev/null
+++ b/modules/Fetch/template.md
@@ -0,0 +1,8 @@
+---
+id: ${id}
+date: ${date}
+---
+
+${text}
+
+${attachments}
diff --git a/modules/Fetch/utils.py b/modules/Fetch/utils.py
new file mode 100644
index 00000000..f5d95d5b
--- /dev/null
+++ b/modules/Fetch/utils.py
@@ -0,0 +1,13 @@
+def until(keys: list):
+ def select(value):
+ for key in keys:
+ if key in value:
+ return value[key]
+ return None
+
+ return select
+
+
+def copy(source: dict, destination: dict):
+ for k, v in source.items():
+ destination[k] = v
diff --git a/modules/Fetch/vk.py b/modules/Fetch/vk.py
new file mode 100644
index 00000000..bb098ea9
--- /dev/null
+++ b/modules/Fetch/vk.py
@@ -0,0 +1,166 @@
+import requests
+from urllib.parse import urlencode
+
+client_id = '4362480'
+client_secret = 'CI8hARpbqa5amp4OfTS6'
+access_token = '39c1712d4005b24bd9faddf34b7f4647a26afb4c7b1a935ba7680b24378a9acb3e0faed5b3af8a1e7879c'
+api_version = '5.52'
+VK_API = 'https://api.vk.com/method/'
+
+
+def vk_init(app_id, app_secret):
+ global client_id
+ global client_secret
+ client_id = app_id
+ client_secret = app_secret
+
+
+def http_get(url):
+ req = requests.get(url)
+ return req.json()
+
+
+def upload_file(url, file):
+ req = requests.post(url, files={'photo': file})
+ return req.json()
+
+
+def vk_auth(client_id, redirect_uri, scope, response_type):
+ q = urlencode({
+ 'client_id': client_id,
+ 'scope': ','.join(scope),
+ 'v': api_version,
+ 'redirect_uri': redirect_uri,
+ 'display': 'page',
+ 'response_type': response_type
+ })
+ return 'https://oauth.vk.com/authorize?' + q
+
+
+def vk_get_access_token(client_id, client_secret, redirect_uri, code):
+ q = urlencode({
+ 'client_id': client_id,
+ 'client_secret': client_secret,
+ 'code': code,
+ 'redirect_uri': redirect_uri,
+ })
+ uri = 'https://oauth.vk.com/access_token?' + q
+ return http_get(uri)
+
+
+def vk_photos_get_wall_upload_server():
+ q = urlencode({
+ 'access_token': access_token,
+ })
+ uri = VK_API + 'photos.getWallUploadServer?' + q
+ return http_get(uri)['response']
+
+
+def vk_photos_save_wall_photo(server, hash, photo):
+ q = urlencode({
+ 'access_token': access_token,
+ 'v': api_version,
+ 'server': server,
+ 'hash': hash,
+ 'photo': photo,
+ })
+ uri = VK_API + 'photos.saveWallPhoto?' + q
+ return http_get(uri)
+
+
+def vk_wall_get_by_id(ids):
+ if not isinstance(ids, list):
+ ids = [ids]
+
+ q = urlencode({
+ 'posts': ','.join(ids),
+ 'v': api_version,
+ })
+ uri = VK_API + 'wall.getById?{q}'.format(q=q)
+ return http_get(uri)
+
+
+def vk_wall_post(owner_id, message, attachments):
+ q = urlencode({
+ 'access_token': access_token,
+ 'v': api_version,
+ 'owner_id': owner_id,
+ 'message': message,
+ 'attachments': ','.join(attachments)
+ })
+ uri = VK_API + 'wall.post?{q}'.format(q=q)
+ return http_get(uri)
+
+
+def vk_photos_get_albums(owner_id, album_ids):
+ q = urlencode({
+ 'v': api_version,
+ 'owner_id': owner_id,
+ 'album_ids': ','.join(album_ids),
+ 'photo_sizes': '1',
+ 'need_covers': '1',
+ })
+ uri = VK_API + 'photos.getAlbums?{q}'.format(q=q)
+ return http_get(uri)
+
+
+def vk_photos_get(owner_id, album_id):
+ q = urlencode({
+ 'v': api_version,
+ 'owner_id': owner_id,
+ 'album_id': album_id,
+ 'photo_sizes': '1',
+ })
+ uri = VK_API + 'photos.get?{q}'.format(q=q)
+ return http_get(uri)
+
+if __name__ == '__main__':
+ import os
+
+ print(os.getcwd())
+
+ # redirect_uri = 'http://tmshv.ru/callback'
+ redirect_uri = 'http://vk.com/blank.html'
+
+ # print(vk_auth(client_id, redirect_uri, ['photos', 'wall', 'offline', 'messages'], 'token'))
+
+ # exit()
+
+ upload_url = vk_photos_get_wall_upload_server()['upload_url']
+ print(upload_url)
+
+ # UPLOADING
+ uploaded = upload_file(upload_url, open('1.jpg', 'rb'))
+ print(uploaded)
+ exit()
+
+ # uploaded_photo = uploaded['photo']
+ saved_photo = vk_photos_save_wall_photo(**uploaded)
+ print(saved_photo)
+
+ # {'response': [
+ # {
+ # 'text': '',
+ # 'id': 420377937,
+ # 'album_id': -14,
+ # 'photo_75': 'http://cs631817.vk.me/v631817931/37c93/eiG89yDwZl4.jpg',
+ # 'photo_130': 'http://cs631817.vk.me/v631817931/37c94/FDDyNTsJYYQ.jpg',
+ # 'date': 1467142947,
+ # 'width': 200,
+ # 'owner_id': 1338931,
+ # 'photo_604': 'http://cs631817.vk.me/v631817931/37c95/_TMbT8QHwAc.jpg',
+ # 'height': 200}
+ # ]
+ # }
+
+ photo_id = saved_photo['response'][0]['id']
+ photo_owner_id = saved_photo['response'][0]['owner_id']
+
+ attachment = '{type}{owner_id}_{media_id}'.format(
+ type='photo',
+ owner_id=photo_owner_id,
+ media_id=photo_id
+ )
+
+ post = vk_wall_post(photo_owner_id, '#api #test', [attachment])
+ print(post)
diff --git a/package-lock.json b/package-lock.json
index 01e6761a..21510145 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -95,6 +95,16 @@
"upath": "^1.0.0"
}
},
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
"expand-brackets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -1773,18 +1783,52 @@
}
}
},
+ "@mikeljames/draft-js-drag-n-drop-upload-plugin": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@mikeljames/draft-js-drag-n-drop-upload-plugin/-/draft-js-drag-n-drop-upload-plugin-2.0.1.tgz",
+ "integrity": "sha1-gph14gIKejxLILIIvLUqqQLHtnc=",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.0.2",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
"abbrev": {
"version": "1.1.0",
"resolved": "http://storage.mds.yandex.net/get-npm/66641/abbrev-1.1.0.tgz",
"integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8="
},
"accepts": {
- "version": "1.3.3",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/accepts-1.3.3.tgz",
- "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=",
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
- "mime-types": "~2.1.11",
+ "mime-types": "~2.1.18",
"negotiator": "0.6.1"
+ },
+ "dependencies": {
+ "mime-db": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
+ "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="
+ },
+ "mime-types": {
+ "version": "2.1.18",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
+ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+ "requires": {
+ "mime-db": "~1.33.0"
+ }
+ }
}
},
"acorn": {
@@ -1831,6 +1875,7 @@
"version": "4.11.8",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
+ "dev": true,
"requires": {
"co": "^4.6.0",
"json-stable-stringify": "^1.0.1"
@@ -2160,7 +2205,8 @@
"assert-plus": {
"version": "0.2.0",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
+ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
+ "dev": true
},
"assign-symbols": {
"version": "1.0.0",
@@ -2249,7 +2295,8 @@
"aws-sign2": {
"version": "0.6.0",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
+ "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
+ "dev": true
},
"aws4": {
"version": "1.6.0",
@@ -2872,9 +2919,9 @@
}
},
"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=",
+ "version": "6.26.2",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz",
+ "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==",
"dev": true,
"requires": {
"babel-plugin-transform-strict-mode": "^6.24.1",
@@ -3088,9 +3135,9 @@
}
},
"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==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",
+ "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==",
"dev": true,
"requires": {
"babel-plugin-check-es2015-constants": "^6.22.0",
@@ -3120,25 +3167,25 @@
"babel-plugin-transform-es2015-unicode-regex": "^6.22.0",
"babel-plugin-transform-exponentiation-operator": "^6.22.0",
"babel-plugin-transform-regenerator": "^6.22.0",
- "browserslist": "^2.1.2",
+ "browserslist": "^3.2.6",
"invariant": "^2.2.2",
"semver": "^5.3.0"
},
"dependencies": {
"browserslist": {
- "version": "2.11.3",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz",
- "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==",
+ "version": "3.2.8",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz",
+ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30000792",
- "electron-to-chromium": "^1.3.30"
+ "caniuse-lite": "^1.0.30000844",
+ "electron-to-chromium": "^1.3.47"
}
},
"electron-to-chromium": {
- "version": "1.3.33",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz",
- "integrity": "sha1-vwBwPWKnxlI4E2V4w1LWxcBCpUU=",
+ "version": "1.3.48",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz",
+ "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=",
"dev": true
}
}
@@ -3227,6 +3274,12 @@
"to-fast-properties": "^1.0.3"
}
},
+ "lodash": {
+ "version": "4.17.10",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
+ },
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
@@ -3285,6 +3338,21 @@
"to-fast-properties": "^1.0.3"
}
},
+ "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"
+ }
+ },
+ "lodash": {
+ "version": "4.17.10",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
+ },
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
@@ -3552,6 +3620,7 @@
"version": "2.10.1",
"resolved": "http://storage.mds.yandex.net/get-npm/38095/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
+ "dev": true,
"requires": {
"hoek": "2.x.x"
}
@@ -3854,9 +3923,9 @@
"dev": true
},
"caniuse-lite": {
- "version": "1.0.30000808",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000808.tgz",
- "integrity": "sha512-vT0JLmHdvq1UVbYXioxCXHYdNw55tyvi+IUWyX0Zeh1OFQi2IllYtm38IJnSgHWCv/zUnX1hdhy3vMJvuTNSqw==",
+ "version": "1.0.30000851",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000851.tgz",
+ "integrity": "sha512-Y1ecA1cL9wg0vni8t33nBw/poX8ypm+2c3fbwAESj8cm4ufK9CBFQ1+nUK8Dp5dtFo5Fc3JzkI5DKmQbuIo6hQ==",
"dev": true
},
"capture-stack-trace": {
@@ -4292,32 +4361,19 @@
}
},
"concat-with-sourcemaps": {
- "version": "1.0.4",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/concat-with-sourcemaps-1.0.4.tgz",
- "integrity": "sha1-9Vs74q60dgGxCi1SWcz7cP0vHdY=",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
+ "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
"dev": true,
"requires": {
- "source-map": "^0.5.1"
- }
- },
- "connect": {
- "version": "3.6.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/connect-3.6.2.tgz",
- "integrity": "sha1-aU6NIGgb/kkCgsiriGvpjwn0L+c=",
- "requires": {
- "debug": "2.6.7",
- "finalhandler": "1.0.3",
- "parseurl": "~1.3.1",
- "utils-merge": "1.0.0"
+ "source-map": "^0.6.1"
},
"dependencies": {
- "debug": {
- "version": "2.6.7",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/debug-2.6.7.tgz",
- "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=",
- "requires": {
- "ms": "2.0.0"
- }
+ "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
}
}
},
@@ -4351,21 +4407,13 @@
},
"content-disposition": {
"version": "0.5.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/content-disposition-0.5.2.tgz",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
- "content-security-policy-builder": {
- "version": "1.1.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/content-security-policy-builder-1.1.0.tgz",
- "integrity": "sha1-2R8bB2I2wRmFDH3umSS/VeBXcrM=",
- "requires": {
- "dashify": "^0.2.0"
- }
- },
"content-type": {
- "version": "1.0.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/content-type-1.0.2.tgz",
- "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0="
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"convert-source-map": {
"version": "1.5.0",
@@ -4374,12 +4422,12 @@
"dev": true
},
"cookies": {
- "version": "0.7.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/cookies-0.7.0.tgz",
- "integrity": "sha1-C8lh2RDDUlSYD8fJ7/XaEgEbvwA=",
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.1.tgz",
+ "integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=",
"requires": {
- "depd": "~1.1.0",
- "keygrip": "~1.0.1"
+ "depd": "~1.1.1",
+ "keygrip": "~1.0.2"
}
},
"copy-descriptor": {
@@ -4518,6 +4566,7 @@
"version": "2.0.5",
"resolved": "http://storage.mds.yandex.net/get-npm/66641/cryptiles-2.0.5.tgz",
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
+ "dev": true,
"requires": {
"boom": "2.x.x"
}
@@ -4741,11 +4790,6 @@
"resolved": "http://storage.mds.yandex.net/get-npm/66641/dasherize-2.0.0.tgz",
"integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg="
},
- "dashify": {
- "version": "0.2.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/dashify-0.2.2.tgz",
- "integrity": "sha1-agdBWgHJH69KMuONnfunH2HLIP4="
- },
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
@@ -4759,15 +4803,15 @@
"dev": true
},
"deap": {
- "version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/deap-1.0.0.tgz",
- "integrity": "sha1-sUi/gkMKJ2mbdIOgPra2dYW/yIg=",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/deap/-/deap-1.0.1.tgz",
+ "integrity": "sha512-k75KYNZMvwAwes2xIPry/QTffXIchjD8QfABvvfTr80P85jv5ZcKqcoDo+vMe71nNnVnXYe8MA28weyqcf/DKw==",
"dev": true
},
"debug": {
- "version": "2.6.8",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/debug-2.6.8.tgz",
- "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
@@ -5178,9 +5222,14 @@
}
}
},
+ "decorate-component-with-props": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/decorate-component-with-props/-/decorate-component-with-props-1.1.0.tgz",
+ "integrity": "sha512-tTYQojixN64yK3/WBODMfvss/zbmyUx9HQXhzSxZiSiofeekVeRyyuToy9BCiTMrVEIKWxTcla2t3y5qdaUF7Q=="
+ },
"deep-equal": {
"version": "1.0.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/deep-equal-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"deep-extend": {
@@ -5313,9 +5362,9 @@
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"depd": {
- "version": "1.1.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/depd-1.1.0.tgz",
- "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"des.js": {
"version": "1.0.0",
@@ -5329,7 +5378,7 @@
},
"destroy": {
"version": "1.0.4",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/destroy-1.0.4.tgz",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"detect-file": {
@@ -5347,6 +5396,13 @@
"repeating": "^2.0.0"
}
},
+ "detect-libc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
+ "dev": true,
+ "optional": true
+ },
"diagnostics": {
"version": "1.0.1",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/diagnostics-1.0.1.tgz",
@@ -5643,6 +5699,165 @@
}
}
},
+ "draft-js": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/draft-js/-/draft-js-0.10.5.tgz",
+ "integrity": "sha512-LE6jSCV9nkPhfVX2ggcRLA4FKs6zWq9ceuO/88BpXdNCS7mjRTgs0NsV6piUCJX9YxMsB9An33wnkMmU2sD2Zg==",
+ "requires": {
+ "fbjs": "^0.8.15",
+ "immutable": "~3.7.4",
+ "object-assign": "^4.1.0"
+ },
+ "dependencies": {
+ "core-js": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
+ "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
+ },
+ "fbjs": {
+ "version": "0.8.16",
+ "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
+ "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=",
+ "requires": {
+ "core-js": "^1.0.0",
+ "isomorphic-fetch": "^2.1.1",
+ "loose-envify": "^1.0.0",
+ "object-assign": "^4.1.0",
+ "promise": "^7.1.1",
+ "setimmediate": "^1.0.5",
+ "ua-parser-js": "^0.7.9"
+ }
+ },
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-alignment-plugin": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/draft-js-alignment-plugin/-/draft-js-alignment-plugin-2.0.3.tgz",
+ "integrity": "sha512-cXp3RF9IpYX95SN323e8pJcO/ghMDDJVJ9qrkV6BZGsC6UfWcFRbSpctct41iyNVwRQRMJhFyLSNn3tu6fiHuw==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "draft-js-buttons": "^2.0.1",
+ "find-with-regex": "^1.1.2",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-buttons": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/draft-js-buttons/-/draft-js-buttons-2.0.1.tgz",
+ "integrity": "sha512-d5FKPGpRe0vmFrCuglZkLloErGVsPTefeBcHiqvw03aLdPlnM4wO0Y5R43TPI+oEoZxplEQuycBvGmUmO8dhbQ==",
+ "requires": {
+ "union-class-names": "^1.0.0"
+ }
+ },
+ "draft-js-drag-n-drop-plugin": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/draft-js-drag-n-drop-plugin/-/draft-js-drag-n-drop-plugin-2.0.3.tgz",
+ "integrity": "sha512-sEM6nmDb4/vk7Ol0brGDxJmaBBu1Nf1Pl6GzZuDCAOMIfjZaLGnEf++SrtfA/1PoiMOhF2FN7y3i7QiuRXqOLg==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.1.3",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-focus-plugin": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/draft-js-focus-plugin/-/draft-js-focus-plugin-2.0.4.tgz",
+ "integrity": "sha512-+JcBJDpLBLB8o1sz5lREYtrQiWvJr0pLgQDEwe4vTkFZ6tjtTJHRqqr2hmlzV2r95jA1MW9+tBpzrfD8MqM9ZA==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.1.3",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-image-plugin": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/draft-js-image-plugin/-/draft-js-image-plugin-2.0.5.tgz",
+ "integrity": "sha512-f01XjVeXNbmGEr1W68f9zsdVXWJN9rQiJrNaxHV0okwO/wzC78wbDFPxpLFC7VhNH5+pyOPcApHu328NIP1b+g==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.1.3",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-plugins-editor": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/draft-js-plugins-editor/-/draft-js-plugins-editor-2.0.8.tgz",
+ "integrity": "sha512-vC77HLj4sNIX7NLtDd86szJRFqoZIH8PBZ2c7zO7m2iiA9FQILGlwkdnDbFgl9gPXEU/gxOCSqigXmCR/RlWDg==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.1.3",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
+ "draft-js-resizeable-plugin": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/draft-js-resizeable-plugin/-/draft-js-resizeable-plugin-2.0.6.tgz",
+ "integrity": "sha512-nu1yW4NR9Bd5np7zsi6AOFGMI17Gv8ndxzzRo9Z58YNYt/Zv94HximzxVTTqxFsbNQjYUNEJTb2yexg5jXAscg==",
+ "requires": {
+ "decorate-component-with-props": "^1.0.2",
+ "find-with-regex": "^1.1.3",
+ "immutable": "~3.7.4",
+ "prop-types": "^15.5.8",
+ "union-class-names": "^1.0.0"
+ },
+ "dependencies": {
+ "immutable": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
+ "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
+ }
+ }
+ },
"duplexer2": {
"version": "0.0.2",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/duplexer2-0.0.2.tgz",
@@ -5788,11 +6003,6 @@
"env-variable": "0.0.x"
}
},
- "encodeurl": {
- "version": "1.0.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/encodeurl-1.0.1.tgz",
- "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
- },
"encoding": {
"version": "0.1.12",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/encoding-0.1.12.tgz",
@@ -5866,7 +6076,7 @@
},
"error-inject": {
"version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/error-inject-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/error-inject/-/error-inject-1.0.0.tgz",
"integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc="
},
"es-abstract": {
@@ -6072,6 +6282,15 @@
"user-home": "^2.0.0"
},
"dependencies": {
+ "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"
+ }
+ },
"user-home": {
"version": "2.0.0",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/user-home-2.0.0.tgz",
@@ -6294,11 +6513,6 @@
"homedir-polyfill": "^1.0.1"
}
},
- "expect-ct": {
- "version": "0.1.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/expect-ct-0.1.0.tgz",
- "integrity": "sha1-UnNWeN4YUwiQ2Ne5XwrGNkCVgJQ="
- },
"extend": {
"version": "3.0.1",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/extend-3.0.1.tgz",
@@ -6340,14 +6554,12 @@
"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
+ "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
},
"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
+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-levenshtein": {
"version": "2.0.6",
@@ -6453,30 +6665,6 @@
"repeat-string": "^1.5.2"
}
},
- "finalhandler": {
- "version": "1.0.3",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/finalhandler-1.0.3.tgz",
- "integrity": "sha1-70fneVDpmXgOhgIqVg4yF+DQzIk=",
- "requires": {
- "debug": "2.6.7",
- "encodeurl": "~1.0.1",
- "escape-html": "~1.0.3",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.1",
- "statuses": "~1.3.1",
- "unpipe": "~1.0.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.7",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/debug-2.6.7.tgz",
- "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=",
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
"find-cache-dir": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
@@ -6511,6 +6699,11 @@
"semver-regex": "^1.0.0"
}
},
+ "find-with-regex": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/find-with-regex/-/find-with-regex-1.1.3.tgz",
+ "integrity": "sha512-zkEVQ1H3PIQL/19ADKt1lCQU4QGM3OneiderUcFgn5EgTm/TnoUh7HxPAwP8w/vXxWSLC6KtpbDQpypJ5+majw=="
+ },
"findup-sync": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
@@ -6564,6 +6757,15 @@
}
}
},
+ "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"
+ }
+ },
"expand-brackets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -6924,6 +7126,7 @@
"version": "2.1.4",
"resolved": "http://storage.mds.yandex.net/get-npm/38095/form-data-2.1.4.tgz",
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
+ "dev": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.5",
@@ -6945,9 +7148,9 @@
"integrity": "sha1-e8rUae57lukdEs6zlZx4I1qScuk="
},
"fresh": {
- "version": "0.5.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/fresh-0.5.0.tgz",
- "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44="
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-mkdirp-stream": {
"version": "1.0.0",
@@ -6979,1007 +7182,6 @@
"requires": {
"nan": "^2.3.0",
"node-pre-gyp": "^0.6.36"
- },
- "dependencies": {
- "abbrev": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
- "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=",
- "dev": true,
- "optional": true
- },
- "ajv": {
- "version": "4.11.8",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
- "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
- "dev": true,
- "optional": true,
- "requires": {
- "co": "^4.6.0",
- "json-stable-stringify": "^1.0.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
- },
- "aproba": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
- "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=",
- "dev": true,
- "optional": true
- },
- "are-we-there-yet": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
- "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
- "dev": true,
- "optional": true,
- "requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^2.0.6"
- }
- },
- "asn1": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
- "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
- "dev": true,
- "optional": true
- },
- "assert-plus": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
- "dev": true,
- "optional": true
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "dev": true,
- "optional": true
- },
- "aws-sign2": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
- "dev": true,
- "optional": true
- },
- "aws4": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
- "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
- "dev": true,
- "optional": true
- },
- "balanced-match": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
- "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
- "dev": true
- },
- "bcrypt-pbkdf": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
- "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
- "dev": true,
- "optional": true,
- "requires": {
- "tweetnacl": "^0.14.3"
- }
- },
- "block-stream": {
- "version": "0.0.9",
- "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
- "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
- "dev": true,
- "requires": {
- "inherits": "~2.0.0"
- }
- },
- "boom": {
- "version": "2.10.1",
- "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
- "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
- "dev": true,
- "requires": {
- "hoek": "2.x.x"
- }
- },
- "brace-expansion": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
- "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
- "dev": true,
- "requires": {
- "balanced-match": "^0.4.1",
- "concat-map": "0.0.1"
- }
- },
- "buffer-shims": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
- "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=",
- "dev": true
- },
- "caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "dev": true,
- "optional": true
- },
- "co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "dev": true,
- "optional": 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
- },
- "combined-stream": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
- "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
- "dev": true,
- "requires": {
- "delayed-stream": "~1.0.0"
- }
- },
- "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-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
- "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
- },
- "cryptiles": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "dev": true,
- "optional": true,
- "requires": {
- "boom": "2.x.x"
- }
- },
- "dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "^1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true,
- "optional": true
- }
- }
- },
- "debug": {
- "version": "2.6.8",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
- "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
- "dev": true,
- "optional": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "deep-extend": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz",
- "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=",
- "dev": true,
- "optional": true
- },
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true
- },
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
- "dev": true,
- "optional": true
- },
- "ecc-jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
- "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
- "dev": true,
- "optional": true,
- "requires": {
- "jsbn": "~0.1.0"
- }
- },
- "extend": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
- "dev": true,
- "optional": true
- },
- "extsprintf": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
- "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=",
- "dev": true
- },
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
- "dev": true,
- "optional": true
- },
- "form-data": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
- "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
- "dev": true,
- "optional": true,
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.5",
- "mime-types": "^2.1.12"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
- },
- "fstream": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
- "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "inherits": "~2.0.0",
- "mkdirp": ">=0.5 0",
- "rimraf": "2"
- }
- },
- "fstream-ignore": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
- "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=",
- "dev": true,
- "optional": true,
- "requires": {
- "fstream": "^1.0.0",
- "inherits": "2",
- "minimatch": "^3.0.0"
- }
- },
- "gauge": {
- "version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
- "dev": true,
- "optional": true,
- "requires": {
- "aproba": "^1.0.3",
- "console-control-strings": "^1.0.0",
- "has-unicode": "^2.0.0",
- "object-assign": "^4.1.0",
- "signal-exit": "^3.0.0",
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1",
- "wide-align": "^1.1.0"
- }
- },
- "getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "^1.0.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true,
- "optional": true
- }
- }
- },
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- },
- "har-schema": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
- "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
- "dev": true,
- "optional": true
- },
- "har-validator": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
- "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
- "dev": true,
- "optional": true,
- "requires": {
- "ajv": "^4.9.1",
- "har-schema": "^1.0.5"
- }
- },
- "has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
- "dev": true,
- "optional": true
- },
- "hawk": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
- "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
- "dev": true,
- "optional": true,
- "requires": {
- "boom": "2.x.x",
- "cryptiles": "2.x.x",
- "hoek": "2.x.x",
- "sntp": "1.x.x"
- }
- },
- "hoek": {
- "version": "2.16.3",
- "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
- "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
- "dev": true
- },
- "http-signature": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
- "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
- "dev": true,
- "optional": true,
- "requires": {
- "assert-plus": "^0.2.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- }
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
- "ini": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
- "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=",
- "dev": true,
- "optional": true
- },
- "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.0"
- }
- },
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
- "dev": true,
- "optional": true
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
- "dev": true,
- "optional": true
- },
- "jodid25519": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
- "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=",
- "dev": true,
- "optional": true,
- "requires": {
- "jsbn": "~0.1.0"
- }
- },
- "jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "dev": true,
- "optional": true
- },
- "json-schema": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "dev": true,
- "optional": true
- },
- "json-stable-stringify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "dev": true,
- "optional": true,
- "requires": {
- "jsonify": "~0.0.0"
- }
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "dev": true,
- "optional": true
- },
- "jsonify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "dev": true,
- "optional": true
- },
- "jsprim": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
- "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=",
- "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",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true,
- "optional": true
- }
- }
- },
- "mime-db": {
- "version": "1.27.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz",
- "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=",
- "dev": true
- },
- "mime-types": {
- "version": "2.1.15",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
- "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
- "dev": true,
- "requires": {
- "mime-db": "~1.27.0"
- }
- },
- "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.7"
- }
- },
- "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,
- "optional": true
- },
- "node-pre-gyp": {
- "version": "0.6.36",
- "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz",
- "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=",
- "dev": true,
- "optional": true,
- "requires": {
- "mkdirp": "^0.5.1",
- "nopt": "^4.0.1",
- "npmlog": "^4.0.2",
- "rc": "^1.1.7",
- "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",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
- "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
- "dev": true,
- "optional": true,
- "requires": {
- "abbrev": "1",
- "osenv": "^0.1.4"
- }
- },
- "npmlog": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz",
- "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==",
- "dev": true,
- "optional": true,
- "requires": {
- "are-we-there-yet": "~1.1.2",
- "console-control-strings": "~1.1.0",
- "gauge": "~2.7.3",
- "set-blocking": "~2.0.0"
- }
- },
- "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
- },
- "oauth-sign": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
- "dev": true,
- "optional": 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,
- "optional": true
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "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,
- "optional": true
- },
- "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,
- "optional": true
- },
- "osenv": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz",
- "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=",
- "dev": true,
- "optional": true,
- "requires": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
- }
- },
- "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
- },
- "performance-now": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
- "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
- "dev": true,
- "optional": 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
- },
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "dev": true,
- "optional": true
- },
- "qs": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
- "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
- "dev": true,
- "optional": true
- },
- "rc": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz",
- "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=",
- "dev": true,
- "optional": true,
- "requires": {
- "deep-extend": "~0.4.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true,
- "optional": true
- }
- }
- },
- "readable-stream": {
- "version": "2.2.9",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz",
- "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=",
- "dev": true,
- "requires": {
- "buffer-shims": "~1.0.0",
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "string_decoder": "~1.0.0",
- "util-deprecate": "~1.0.1"
- }
- },
- "request": {
- "version": "2.81.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
- "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
- "dev": true,
- "optional": true,
- "requires": {
- "aws-sign2": "~0.6.0",
- "aws4": "^1.2.1",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.5",
- "extend": "~3.0.0",
- "forever-agent": "~0.6.1",
- "form-data": "~2.1.1",
- "har-validator": "~4.2.1",
- "hawk": "~3.1.3",
- "http-signature": "~1.1.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.7",
- "oauth-sign": "~0.8.1",
- "performance-now": "^0.2.0",
- "qs": "~6.4.0",
- "safe-buffer": "^5.0.1",
- "stringstream": "~0.0.4",
- "tough-cookie": "~2.3.0",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.0.0"
- }
- },
- "rimraf": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
- "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
- "dev": true,
- "requires": {
- "glob": "^7.0.5"
- }
- },
- "safe-buffer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
- "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
- "dev": true
- },
- "semver": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
- "dev": true,
- "optional": 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,
- "optional": 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,
- "optional": true
- },
- "sntp": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
- "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
- "dev": true,
- "optional": true,
- "requires": {
- "hoek": "2.x.x"
- }
- },
- "sshpk": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz",
- "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=",
- "dev": true,
- "optional": true,
- "requires": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jodid25519": "^1.0.0",
- "jsbn": "~0.1.0",
- "tweetnacl": "~0.14.0"
- },
- "dependencies": {
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true,
- "optional": true
- }
- }
- },
- "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.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "string_decoder": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
- "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
- "dev": true,
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "stringstream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
- "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=",
- "dev": true,
- "optional": true
- },
- "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.0.0"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
- "dev": true,
- "optional": true
- },
- "tar": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
- "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
- "dev": true,
- "requires": {
- "block-stream": "*",
- "fstream": "^1.0.2",
- "inherits": "2"
- }
- },
- "tar-pack": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz",
- "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=",
- "dev": true,
- "optional": true,
- "requires": {
- "debug": "^2.2.0",
- "fstream": "^1.0.10",
- "fstream-ignore": "^1.0.5",
- "once": "^1.3.3",
- "readable-stream": "^2.1.4",
- "rimraf": "^2.5.1",
- "tar": "^2.2.1",
- "uid-number": "^0.0.6"
- }
- },
- "tough-cookie": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
- "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
- "dev": true,
- "optional": true,
- "requires": {
- "punycode": "^1.4.1"
- }
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
- "dev": true,
- "optional": true,
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "dev": true,
- "optional": true
- },
- "uid-number": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
- "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=",
- "dev": true,
- "optional": 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
- },
- "uuid": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
- "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=",
- "dev": true,
- "optional": true
- },
- "verror": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
- "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
- "dev": true,
- "optional": true,
- "requires": {
- "extsprintf": "1.0.2"
- }
- },
- "wide-align": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz",
- "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==",
- "dev": true,
- "optional": true,
- "requires": {
- "string-width": "^1.0.2"
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
- }
}
},
"fstream": {
@@ -7994,6 +7196,18 @@
"rimraf": "2"
}
},
+ "fstream-ignore": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
+ "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "fstream": "^1.0.0",
+ "inherits": "2",
+ "minimatch": "^3.0.0"
+ }
+ },
"function-bind": {
"version": "1.1.0",
"resolved": "http://storage.mds.yandex.net/get-npm/38095/function-bind-1.1.0.tgz",
@@ -8282,6 +7496,15 @@
"upath": "^1.0.0"
}
},
+ "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"
+ }
+ },
"expand-brackets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -9108,12 +8331,16 @@
"har-schema": {
"version": "1.0.5",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/har-schema-1.0.5.tgz",
- "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4="
+ "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
+ "dev": true,
+ "optional": true
},
"har-validator": {
"version": "4.2.1",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/har-validator-4.2.1.tgz",
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
+ "dev": true,
+ "optional": true,
"requires": {
"ajv": "^4.9.1",
"har-schema": "^1.0.5"
@@ -9246,6 +8473,7 @@
"version": "3.1.3",
"resolved": "http://storage.mds.yandex.net/get-npm/38095/hawk-3.1.3.tgz",
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
+ "dev": true,
"requires": {
"boom": "2.x.x",
"cryptiles": "2.x.x",
@@ -9260,35 +8488,56 @@
"dev": true
},
"helmet": {
- "version": "3.8.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/helmet-3.8.0.tgz",
- "integrity": "sha1-u6C/7r5IMpZxiOTNIzo9REkD4ac=",
+ "version": "3.12.1",
+ "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.12.1.tgz",
+ "integrity": "sha512-/CsAcbPIHgiGde395IkHUZyRLW126RJ6AtxFy6Y6bxhd44Qq8cZ5BBFZ0xNUSbcgX57j32Emh3OhWz/0XgAB5Q==",
"requires": {
- "connect": "3.6.2",
"dns-prefetch-control": "0.1.0",
"dont-sniff-mimetype": "1.0.0",
- "expect-ct": "0.1.0",
+ "expect-ct": "0.1.1",
"frameguard": "3.0.0",
- "helmet-csp": "2.5.0",
+ "helmet-csp": "2.7.0",
"hide-powered-by": "1.0.0",
"hpkp": "2.0.0",
"hsts": "2.1.0",
"ienoopen": "1.0.0",
"nocache": "2.0.0",
"referrer-policy": "1.1.0",
- "x-xss-protection": "1.0.0"
- }
- },
- "helmet-csp": {
- "version": "2.5.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/helmet-csp-2.5.0.tgz",
- "integrity": "sha1-/dZ0UWNAT8Vs0kdh/Zo3nAQbHOk=",
- "requires": {
- "camelize": "1.0.0",
- "content-security-policy-builder": "1.1.0",
- "dasherize": "2.0.0",
- "lodash.reduce": "4.6.0",
- "platform": "1.3.4"
+ "x-xss-protection": "1.1.0"
+ },
+ "dependencies": {
+ "content-security-policy-builder": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.0.0.tgz",
+ "integrity": "sha512-j+Nhmj1yfZAikJLImCvPJFE29x/UuBi+/MWqggGGc515JKaZrjuei2RhULJmy0MsstW3E3htl002bwmBNMKr7w=="
+ },
+ "expect-ct": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/expect-ct/-/expect-ct-0.1.1.tgz",
+ "integrity": "sha512-ngXzTfoRGG7fYens3/RMb6yYoVLvLMfmsSllP/mZPxNHgFq41TmPSLF/nLY7fwoclI2vElvAmILFWGUYqdjfCg=="
+ },
+ "helmet-csp": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.7.0.tgz",
+ "integrity": "sha512-IGIAkWnxjRbgMXFA2/kmDqSIrIaSfZ6vhMHlSHw7jm7Gm9nVVXqwJ2B1YEpYrJsLrqY+w2Bbimk7snux9+sZAw==",
+ "requires": {
+ "camelize": "1.0.0",
+ "content-security-policy-builder": "2.0.0",
+ "dasherize": "2.0.0",
+ "lodash.reduce": "4.6.0",
+ "platform": "1.3.5"
+ }
+ },
+ "platform": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz",
+ "integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q=="
+ },
+ "x-xss-protection": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.1.0.tgz",
+ "integrity": "sha512-rx3GzJlgEeZ08MIcDsU2vY2B1QEriUKJTSiNHHUIem6eg9pzVOr2TL3Y4Pd6TMAM5D5azGjcxqI62piITBDHVg=="
+ }
}
},
"hide-powered-by": {
@@ -9322,7 +8571,8 @@
"hoek": {
"version": "2.16.3",
"resolved": "http://storage.mds.yandex.net/get-npm/38095/hoek-2.16.3.tgz",
- "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
+ "dev": true
},
"hoist-non-react-statics": {
"version": "1.2.0",
@@ -9457,7 +8707,7 @@
},
"http-assert": {
"version": "1.3.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/http-assert-1.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.3.0.tgz",
"integrity": "sha1-oxpc+IyHPsu1eWkH1NbxMujAHko=",
"requires": {
"deep-equal": "~1.0.1",
@@ -9465,20 +8715,28 @@
}
},
"http-errors": {
- "version": "1.6.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/http-errors-1.6.1.tgz",
- "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=",
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
- "depd": "1.1.0",
+ "depd": "~1.1.2",
"inherits": "2.0.3",
- "setprototypeof": "1.0.3",
- "statuses": ">= 1.3.1 < 2"
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ },
+ "dependencies": {
+ "statuses": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
+ }
}
},
"http-signature": {
"version": "1.1.1",
"resolved": "http://storage.mds.yandex.net/get-npm/69187/http-signature-1.1.1.tgz",
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+ "dev": true,
"requires": {
"assert-plus": "^0.2.0",
"jsprim": "^1.2.2",
@@ -9932,6 +9190,11 @@
}
}
},
+ "immutable": {
+ "version": "3.8.2",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz",
+ "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM="
+ },
"imurmurhash": {
"version": "0.1.4",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/imurmurhash-0.1.4.tgz",
@@ -10210,9 +9473,9 @@
}
},
"is-generator-function": {
- "version": "1.0.6",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/is-generator-function-1.0.6.tgz",
- "integrity": "sha1-nnFlPNFf/zQcecQVFGChMdMen8Q="
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz",
+ "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw=="
},
"is-gif": {
"version": "1.0.0",
@@ -10679,13 +9942,13 @@
"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
+ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
},
"json-stable-stringify": {
"version": "1.0.1",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/json-stable-stringify-1.0.1.tgz",
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
+ "dev": true,
"requires": {
"jsonify": "~0.0.0"
}
@@ -10704,7 +9967,8 @@
"jsonify": {
"version": "0.0.0",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM="
+ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "dev": true
},
"jsonpointer": {
"version": "4.0.1",
@@ -10746,9 +10010,9 @@
"dev": true
},
"keygrip": {
- "version": "1.0.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/keygrip-1.0.1.tgz",
- "integrity": "sha1-sC+kgW7vIajEs1yp5Skh/8iaMOk="
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.2.tgz",
+ "integrity": "sha1-rTKXxVcGneqLz+ek+kkbdcXd65E="
},
"kind-of": {
"version": "3.2.2",
@@ -10759,9 +10023,9 @@
}
},
"koa": {
- "version": "2.3.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/koa-2.3.0.tgz",
- "integrity": "sha1-nh6OTaQBg5xXuFJ+rcV/dhJ1Vac=",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/koa/-/koa-2.5.1.tgz",
+ "integrity": "sha512-cchwbMeG2dv3E2xTAmheDAuvR53tPgJZN/Hf1h7bTzJLSPcFZp8/t5+bNKJ6GaQZoydhZQ+1GNruhKdj3lIrug==",
"requires": {
"accepts": "^1.2.2",
"content-disposition": "~0.5.0",
@@ -10773,7 +10037,7 @@
"destroy": "^1.0.3",
"error-inject": "~1.0.0",
"escape-html": "~1.0.1",
- "fresh": "^0.5.0",
+ "fresh": "^0.5.2",
"http-assert": "^1.1.0",
"http-errors": "^1.2.8",
"is-generator-function": "^1.0.3",
@@ -10790,9 +10054,9 @@
},
"dependencies": {
"koa-compose": {
- "version": "4.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/koa-compose-4.0.0.tgz",
- "integrity": "sha1-KAClE9nDYe8NY4UrA45Pby1adzw="
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
+ "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw=="
}
}
},
@@ -10850,7 +10114,7 @@
},
"koa-is-json": {
"version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/koa-is-json-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz",
"integrity": "sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ="
},
"koa-logger": {
@@ -10899,6 +10163,16 @@
"debug": "^2.6.0",
"mz": "^2.3.1",
"resolve-path": "^1.3.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ }
}
},
"koa-session": {
@@ -10910,6 +10184,16 @@
"debug": "^2.2.0",
"is-type-of": "^1.0.0",
"uid-safe": "^2.1.3"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ }
}
},
"koa-static": {
@@ -11276,9 +10560,9 @@
}
},
"lodash": {
- "version": "4.17.4",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
+ "version": "4.17.10",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
},
"lodash-es": {
"version": "4.17.5",
@@ -11525,12 +10809,6 @@
"es5-ext": "~0.10.2"
}
},
- "macaddress": {
- "version": "0.2.8",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/macaddress-0.2.8.tgz",
- "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=",
- "dev": true
- },
"make-dir": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
@@ -11657,6 +10935,15 @@
}
}
},
+ "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"
+ }
+ },
"expand-brackets": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -12278,9 +11565,9 @@
}
},
"moment": {
- "version": "2.18.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/moment-2.18.1.tgz",
- "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8="
+ "version": "2.22.2",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
+ "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
},
"mongodb": {
"version": "2.2.30",
@@ -12420,7 +11707,7 @@
},
"negotiator": {
"version": "0.6.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/negotiator-0.6.1.tgz",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
"next-tick": {
@@ -12547,6 +11834,70 @@
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=",
"dev": true
},
+ "node-pre-gyp": {
+ "version": "0.6.39",
+ "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz",
+ "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "detect-libc": "^1.0.2",
+ "hawk": "3.1.3",
+ "mkdirp": "^0.5.1",
+ "nopt": "^4.0.1",
+ "npmlog": "^4.0.2",
+ "rc": "^1.1.7",
+ "request": "2.81.0",
+ "rimraf": "^2.6.1",
+ "semver": "^5.3.0",
+ "tar": "^2.2.1",
+ "tar-pack": "^3.4.0"
+ },
+ "dependencies": {
+ "nopt": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+ "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "abbrev": "1",
+ "osenv": "^0.1.4"
+ }
+ },
+ "request": {
+ "version": "2.81.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
+ "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "aws-sign2": "~0.6.0",
+ "aws4": "^1.2.1",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.5",
+ "extend": "~3.0.0",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.1.1",
+ "har-validator": "~4.2.1",
+ "hawk": "~3.1.3",
+ "http-signature": "~1.1.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.7",
+ "oauth-sign": "~0.8.1",
+ "performance-now": "^0.2.0",
+ "qs": "~6.4.0",
+ "safe-buffer": "^5.0.1",
+ "stringstream": "~0.0.4",
+ "tough-cookie": "~2.3.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.0.0"
+ }
+ }
+ }
+ },
"node-sass": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz",
@@ -12972,7 +12323,7 @@
},
"only": {
"version": "0.0.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/only-0.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz",
"integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q="
},
"optimist": {
@@ -13300,7 +12651,9 @@
"performance-now": {
"version": "0.2.0",
"resolved": "http://storage.mds.yandex.net/get-npm/66641/performance-now-0.2.0.tgz",
- "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU="
+ "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
+ "dev": true,
+ "optional": true
},
"pify": {
"version": "2.3.0",
@@ -13352,11 +12705,6 @@
}
}
},
- "platform": {
- "version": "1.3.4",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/platform-1.3.4.tgz",
- "integrity": "sha1-bw+xftqqSPIUQrOpdcBjEw8cPr0="
- },
"plugin-error": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
@@ -13519,13 +12867,12 @@
}
},
"postcss-filter-plugins": {
- "version": "2.0.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/postcss-filter-plugins-2.0.2.tgz",
- "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz",
+ "integrity": "sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==",
"dev": true,
"requires": {
- "postcss": "^5.0.4",
- "uniqid": "^4.0.0"
+ "postcss": "^5.0.4"
}
},
"postcss-load-config": {
@@ -14170,7 +13517,9 @@
"qs": {
"version": "6.4.0",
"resolved": "http://storage.mds.yandex.net/get-npm/66641/qs-6.4.0.tgz",
- "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM="
+ "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
+ "dev": true,
+ "optional": true
},
"query-string": {
"version": "4.3.4",
@@ -14832,32 +14181,120 @@
}
},
"request": {
- "version": "2.81.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/request-2.81.0.tgz",
- "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
+ "version": "2.87.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz",
+ "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==",
"requires": {
- "aws-sign2": "~0.6.0",
- "aws4": "^1.2.1",
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.6.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.5",
- "extend": "~3.0.0",
+ "extend": "~3.0.1",
"forever-agent": "~0.6.1",
- "form-data": "~2.1.1",
- "har-validator": "~4.2.1",
- "hawk": "~3.1.3",
- "http-signature": "~1.1.0",
+ "form-data": "~2.3.1",
+ "har-validator": "~5.0.3",
+ "http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.7",
- "oauth-sign": "~0.8.1",
- "performance-now": "^0.2.0",
- "qs": "~6.4.0",
- "safe-buffer": "^5.0.1",
- "stringstream": "~0.0.4",
- "tough-cookie": "~2.3.0",
+ "mime-types": "~2.1.17",
+ "oauth-sign": "~0.8.2",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.1",
+ "safe-buffer": "^5.1.1",
+ "tough-cookie": "~2.3.3",
"tunnel-agent": "^0.6.0",
- "uuid": "^3.0.0"
+ "uuid": "^3.1.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "5.5.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+ "requires": {
+ "co": "^4.6.0",
+ "fast-deep-equal": "^1.0.0",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.3.0"
+ }
+ },
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ },
+ "aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
+ },
+ "form-data": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
+ "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "1.0.6",
+ "mime-types": "^2.1.12"
+ },
+ "dependencies": {
+ "combined-stream": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
+ "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ }
+ }
+ },
+ "har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
+ },
+ "har-validator": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
+ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+ "requires": {
+ "ajv": "^5.1.0",
+ "har-schema": "^2.0.0"
+ }
+ },
+ "http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ }
+ },
+ "mime-db": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
+ "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="
+ },
+ "mime-types": {
+ "version": "2.1.18",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
+ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+ "requires": {
+ "mime-db": "~1.33.0"
+ }
+ },
+ "performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+ },
+ "qs": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
+ }
}
},
"request-promise": {
@@ -15056,6 +14493,11 @@
"ret": "~0.1.10"
}
},
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
"sass-graph": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz",
@@ -15245,9 +14687,9 @@
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
},
"setprototypeof": {
- "version": "1.0.3",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/setprototypeof-1.0.3.tgz",
- "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
},
"sha.js": {
"version": "2.4.10",
@@ -15369,6 +14811,15 @@
"use": "^3.1.0"
},
"dependencies": {
+ "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"
+ }
+ },
"define-property": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
@@ -15456,6 +14907,7 @@
"version": "1.0.9",
"resolved": "http://storage.mds.yandex.net/get-npm/69187/sntp-1.0.9.tgz",
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
+ "dev": true,
"requires": {
"hoek": "2.x.x"
}
@@ -15584,9 +15036,9 @@
}
},
"sshpk": {
- "version": "1.13.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/sshpk-1.13.1.tgz",
- "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
+ "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
@@ -15595,12 +15047,13 @@
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/assert-plus-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
@@ -15763,9 +15216,10 @@
}
},
"stringstream": {
- "version": "0.0.5",
- "resolved": "http://storage.mds.yandex.net/get-npm/69187/stringstream-0.0.5.tgz",
- "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
+ "dev": true
},
"strip-ansi": {
"version": "3.0.1",
@@ -16008,6 +15462,35 @@
"inherits": "2"
}
},
+ "tar-pack": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.1.tgz",
+ "integrity": "sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "debug": "^2.2.0",
+ "fstream": "^1.0.10",
+ "fstream-ignore": "^1.0.5",
+ "once": "^1.3.3",
+ "readable-stream": "^2.1.4",
+ "rimraf": "^2.5.1",
+ "tar": "^2.2.1",
+ "uid-number": "^0.0.6"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ }
+ }
+ },
"tar-stream": {
"version": "1.5.4",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/tar-stream-1.5.4.tgz",
@@ -16268,9 +15751,9 @@
"dev": true
},
"tough-cookie": {
- "version": "2.3.2",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/tough-cookie-2.3.2.tgz",
- "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
+ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
"requires": {
"punycode": "^1.4.1"
}
@@ -16407,6 +15890,13 @@
"webpack-sources": "^1.0.1"
}
},
+ "uid-number": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
+ "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=",
+ "dev": true,
+ "optional": true
+ },
"uid-safe": {
"version": "2.1.4",
"resolved": "http://storage.mds.yandex.net/get-npm/66641/uid-safe-2.1.4.tgz",
@@ -16477,6 +15967,11 @@
"integrity": "sha512-TdDmDOTxEf2ad1g3ZBpM6cqKIb2nJpVlz1Q++casDryKz18tpeMBhSng9hjC1CTQCkOV9Rw2knlSB6iRo7ad1w==",
"dev": true
},
+ "union-class-names": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/union-class-names/-/union-class-names-1.0.0.tgz",
+ "integrity": "sha1-kllgitrMOQlKKwz+FseOYgBheEc="
+ },
"union-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
@@ -16509,15 +16004,6 @@
"integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=",
"dev": true
},
- "uniqid": {
- "version": "4.1.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/66641/uniqid-4.1.1.tgz",
- "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=",
- "dev": true,
- "requires": {
- "macaddress": "^0.2.8"
- }
- },
"uniqs": {
"version": "2.0.0",
"resolved": "http://storage.mds.yandex.net/get-npm/45674/uniqs-2.0.0.tgz",
@@ -16712,11 +16198,6 @@
"integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=",
"dev": true
},
- "utils-merge": {
- "version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/35308/utils-merge-1.0.0.tgz",
- "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg="
- },
"uuid": {
"version": "3.1.0",
"resolved": "http://storage.mds.yandex.net/get-npm/35308/uuid-3.1.0.tgz",
@@ -16759,9 +16240,9 @@
"dev": true
},
"vary": {
- "version": "1.1.1",
- "resolved": "http://storage.mds.yandex.net/get-npm/38095/vary-1.1.1.tgz",
- "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"vendors": {
"version": "1.0.1",
@@ -17382,11 +16863,6 @@
"mkdirp": "^0.5.1"
}
},
- "x-xss-protection": {
- "version": "1.0.0",
- "resolved": "http://storage.mds.yandex.net/get-npm/45674/x-xss-protection-1.0.0.tgz",
- "integrity": "sha1-iYr7k4abJGYc+cUvnujbjtB2Tdk="
- },
"xml-char-classes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz",
diff --git a/package.json b/package.json
index 154584db..d692cc96 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"main": "src/bin/www.js",
"scripts": {
"start": "node src/index.js",
+ "build-edit": "webpack -w --env.NODE_ENV=production --env.TARGET=edit",
"build-app": "webpack --env.NODE_ENV=production --env.TARGET=app",
"out": "babel src/ -d out/",
"gulp": "gulp",
@@ -19,13 +20,22 @@
"author": "Roman Timashev",
"license": "ISC",
"dependencies": {
+ "@mikeljames/draft-js-drag-n-drop-upload-plugin": "^2.0.1",
"async-file": "^2.0.2",
"classnames": "^2.2.5",
"co": "^4.4.0",
+ "draft-js": "^0.10.5",
+ "draft-js-alignment-plugin": "^2.0.3",
+ "draft-js-drag-n-drop-plugin": "^2.0.3",
+ "draft-js-focus-plugin": "^2.0.4",
+ "draft-js-image-plugin": "^2.0.5",
+ "draft-js-plugins-editor": "^2.0.8",
+ "draft-js-resizeable-plugin": "^2.0.6",
"ejson": "^2.1.2",
"handlebars": "^4.0.5",
+ "immutable": "^3.8.2",
"instagram-node": "^0.5.1",
- "koa": "^2.0.0-alpha.3",
+ "koa": "^2.5.1",
"koa-bodyparser": "^3.0.0",
"koa-compose": "^3.1.0",
"koa-conditional-get": "^1.0.2",
@@ -39,7 +49,7 @@
"koa-session": "^4.0.0",
"koa-static": "^3.0.0",
"markdown": "^0.5.0",
- "moment": "^2.18.1",
+ "moment": "^2.22.2",
"mongodb": "^2.1.14",
"mz": "^2.4.0",
"react": "^16.3.2",
@@ -66,7 +76,7 @@
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.23.0",
"babel-plugin-transform-regenerator": "^6.26.0",
- "babel-preset-env": "^1.6.1",
+ "babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"css-loader": "^0.28.9",
"cssnano": "^3.4.0",
diff --git a/src/config.js b/src/config.js
index 949061c9..45886d6f 100644
--- a/src/config.js
+++ b/src/config.js
@@ -12,6 +12,7 @@ export const index = path.join(__dirname, 'templates/main.html')
export const sitemapCacheTime = 600000// 600 sec - cache purge period
export const viewMain = path.join(__dirname, 'views/main.hbs')
+export const viewEdit = path.join(__dirname, 'views/edit.hbs')
export const view404 = path.join(__dirname, 'views/404.hbs')
export const sessionConfig = {
diff --git a/src/edit.entry.js b/src/edit.entry.js
new file mode 100644
index 00000000..ee030165
--- /dev/null
+++ b/src/edit.entry.js
@@ -0,0 +1,90 @@
+// import 'babel-core/register'
+// import 'babel-polyfill'
+
+import {render} from 'react-dom'
+import getEditApp from './edit'
+import TextToken from './edit/features/Marker/lib/marker/TextToken'
+import {Marker} from './edit/features/Marker/lib/marker/Marker'
+import SplitToken from './edit/features/Marker/lib/marker/SplitToken'
+import YoutubeToken from './edit/features/Marker/lib/marker/YoutubeToken'
+import {TokenFactory} from './edit/features/Marker/lib/marker/TokenFactory'
+import React from 'react'
+import UrlToken from './edit/features/Marker/lib/marker/UrlToken'
+
+function getMarker() {
+ return (new Marker())
+ .addTokenFactory(new TokenFactory({token: SplitToken}))
+ .addTokenFactory(new TokenFactory({
+ token: YoutubeToken,
+ component: ({url}) => (
+
+ )
+
+ // component: ({url}) => (
+ //
+ // )
+ }))
+ // .addTokenFactory(new TokenFactory({token: InstagramToken}))
+ // .addTokenFactory(BuildTokenFactory(DocumentUrlToken, build=read_document))
+ // .addTokenFactory(new TokenFactory({token: ImageToken}))
+ // .addTokenFactory(BuildTokenFactory(DocumentToken, build=build_document))
+ // .addTokenFactory(BuildTokenFactory(CSVToken, build=read_csv))
+ // .addTokenFactory(new TokenFactory({token: FileToken}))
+ .addTokenFactory(new TokenFactory({
+ token: TextToken,
+ component: ({html}) => (
+
+ )
+ }), {
+ blank: true,
+ })
+ // .add_tree_middleware(fix_links_quotes)
+
+ // sample_tree = await marker.create_tree(sample_text)
+}
+
+function getData() {
+ return `
+# Edit
+https://www.youtube.com/watch?v=pxtCffGya9g
+
+Text row
+`
+ // return [
+ //
+ // 'bla-bla',
+ // '### pop-pop',
+ // 'uiu',
+ // 'Url: [ya](http://ya.ru)',
+ // ]
+}
+
+function main() {
+ const mount = document.querySelector('#app')
+ const marker = getMarker()
+ const data = getData()
+ const app = getEditApp(marker, data)
+
+ render(app, mount)
+}
+
+main()
diff --git a/src/edit/effects/index.js b/src/edit/effects/index.js
new file mode 100644
index 00000000..973f372e
--- /dev/null
+++ b/src/edit/effects/index.js
@@ -0,0 +1,3 @@
+export default function effects() {
+ return []
+}
diff --git a/src/edit/features/App/App.js b/src/edit/features/App/App.js
new file mode 100644
index 00000000..9e97f4c0
--- /dev/null
+++ b/src/edit/features/App/App.js
@@ -0,0 +1,141 @@
+import React, {Component} from 'react'
+import Marker from '../Marker'
+import './App.less'
+import {MarkerWidgetHtml, MarkerWidgetText, MarkerWidgetUrl} from '../Marker/MarkerWidget'
+import ContentEditable from '../Marker/ContentEditable'
+import Editor from '../Editor/'
+
+// import Map from '../Map'
+// import Body from '../Body'
+// import AppWrapper from './AppWrapper'
+//
+// import {bindActionCreators} from 'redux'
+// import {connect} from 'react-redux'
+// import * as actions from './duck'
+//
+// import {routerActions} from 'react-router-redux'
+// import {title as defaultTitle} from '../../../config'
+// import {getVariable} from '../../../lib/style'
+// import {debounce} from '../../../lib/fn'
+// const hit = debounce(50, path => ym('hit', path))
+//
+// const projectPath = project => `/projects/${project.name}`
+// const frameSize = isVertical => [window.innerWidth, window.innerHeight]
+// const frameSizeMultiplier = () => getVariable('--content-width-state-normal')
+// const landscapeProjectBounds = (width, height, ratio=frameSizeMultiplier()) => [
+// [0, 0],
+// [width * ratio, 0],
+// ]
+// const portraitProjectBounds = (width, height, ratio=frameSizeMultiplier()) => [
+// [0, 0],
+// [0, width * ratio],
+// ]
+//
+// function mapStateToProps(state) {
+// const {fullPage, isVertical, halfPageAvailable} = state.app.page
+//
+// return {
+// projects: state.app.projects.items,
+// activeProject: state.app.projects.activeProject,
+// fullPage: halfPageAvailable
+// ? fullPage
+// : true,
+// showFullPageToggle: halfPageAvailable,
+// isVertical,
+// }
+// }
+//
+// function mapDispatchToProps(dispatch) {
+// return bindActionCreators({
+// ...actions,
+// push: routerActions.push
+// }, dispatch)
+// }
+
+// async function build_document(data) {
+// // text = data['caption'] if data['caption'] else data['file']
+// // # document = await self.build()
+// document = {
+// 'url': data['file'],
+// 'image_url': data['file'],
+// 'file_url': data['file'],
+// 'title': text,
+// 'file_size': '0 KB',
+// 'file_format': 'PDF',
+// }
+// return document
+// }
+
+// async function read_csv(data) {
+// return '\n'.join([
+// 'N,Name',
+// `0,${data}`,
+// '1,Pop',
+// '2,Top',
+// ])
+// }
+
+// async function read_document(data) {
+// const doc = await Document.find_one({'id': data})
+// return {
+// 'url': doc['url'],
+// 'image_url': doc['url'],
+// 'file_url': doc['url'],
+// 'title': doc['title'],
+// 'file_size': '0 KB',
+// 'file_format': 'PDF',
+// }
+// }
+
+export default class App extends Component {
+ constructor(props) {
+ super(props)
+
+ this.onMarkerUpdate = this.onMarkerUpdate.bind(this)
+
+ this.state = {
+ tokens: [],
+ }
+ }
+
+ onMarkerUpdate(tokens) {
+ // console.log('Update')
+ // console.log(tokens)
+
+ this.setState({tokens})
+ }
+
+ componentWillMount() {
+ const {data, marker} = this.props
+
+ marker.evaluate(data)
+ .then(tokens => {
+ this.setState({
+ tokens,
+ })
+ })
+
+ // this.setState({
+ // data: this
+ // .getData()
+ // .reduce((acc, x) => [...acc, ...x], []),
+ // })
+ }
+
+ render() {
+ return (
+
+ )
+ }
+}
+
+// export default connect(mapStateToProps, mapDispatchToProps)(App)
diff --git a/src/edit/features/App/App.less b/src/edit/features/App/App.less
new file mode 100644
index 00000000..59ed479c
--- /dev/null
+++ b/src/edit/features/App/App.less
@@ -0,0 +1,9 @@
+.App {
+ display: flex;
+ justify-content: center;
+
+ &-Body {
+ padding-top: 10px;
+ width: 800px;
+ }
+}
diff --git a/src/edit/features/App/App.test.js b/src/edit/features/App/App.test.js
new file mode 100644
index 00000000..b84af98d
--- /dev/null
+++ b/src/edit/features/App/App.test.js
@@ -0,0 +1,8 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import App from './App';
+
+it('renders without crashing', () => {
+ const div = document.createElement('div');
+ ReactDOM.render(, div);
+});
diff --git a/src/edit/features/App/AppWrapper.css b/src/edit/features/App/AppWrapper.css
new file mode 100644
index 00000000..23f8ad42
--- /dev/null
+++ b/src/edit/features/App/AppWrapper.css
@@ -0,0 +1,26 @@
+.AppWrapper {
+ width: 100%;
+ height: 100%;
+
+ position: absolute;
+ top: 0;
+ left: 0;
+
+ z-index: 1000;
+
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start; /* align items in Main Axis */
+ align-items: stretch; /* align items in Cross Axis */
+ align-content: stretch; /* Extra space in Cross Axis */
+
+ pointer-events: none;
+}
+
+.AppWrapper footer {
+ background-color: rgba(34, 34, 34, 0.95);
+ color: #ebebeb;
+
+ padding: 1em 0.5em 0.5em;
+ font-weight: 100;
+}
diff --git a/src/edit/features/App/AppWrapper.js b/src/edit/features/App/AppWrapper.js
new file mode 100644
index 00000000..1bf920d7
--- /dev/null
+++ b/src/edit/features/App/AppWrapper.js
@@ -0,0 +1,88 @@
+import React, {Component} from 'react'
+import {Link} from 'react-router'
+
+import './AppWrapper.css'
+import './AppWrapperHeader.css'
+import './AppWrapperBody.css'
+import './AppWrapperContent.css'
+import './Icon.css'
+
+const Icon = ({children: iconName}) => (
+
+)
+
+class Toggle extends Component {
+ constructor(props) {
+ super(props)
+ this.state = {
+ value: true
+ }
+ }
+
+ onClick = () => {
+ const {value} = this.state
+ const {onClick} = this.props
+
+ this.setState({
+ value: !value,
+ })
+ onClick(!value)
+ }
+
+ render() {
+ const {value} = this.state
+ const icon = value
+ ? 'IconFullScreenOn'
+ : 'IconFullScreenOff'
+
+ return (
+
+ )
+ }
+}
+
+const Head = ({title, onToggleFullPage, showFullPageToggle, showControls = false}) => (
+
+)
+
+const Body = ({children}) => (
+
+)
+
+const AppWrapper = ({title, children, showControls, showFullPageToggle, onToggleFullPage}) => (
+
+
+
+ {children}
+
+)
+
+export default AppWrapper
diff --git a/src/edit/features/App/AppWrapperBody.css b/src/edit/features/App/AppWrapperBody.css
new file mode 100644
index 00000000..338c0bcf
--- /dev/null
+++ b/src/edit/features/App/AppWrapperBody.css
@@ -0,0 +1,7 @@
+.AppWrapperBody {
+ display: flex;
+ flex: 1;
+
+ width: 100%;
+ height: 100%;
+}
diff --git a/src/edit/features/App/AppWrapperContent.css b/src/edit/features/App/AppWrapperContent.css
new file mode 100644
index 00000000..0287e846
--- /dev/null
+++ b/src/edit/features/App/AppWrapperContent.css
@@ -0,0 +1,11 @@
+.AppWrapperContent {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+
+ position: relative;
+
+ /* Needed for when the area gets squished too far and there is content
+ that can't be displayed */
+ overflow: auto;
+}
diff --git a/src/edit/features/App/AppWrapperHeader.css b/src/edit/features/App/AppWrapperHeader.css
new file mode 100644
index 00000000..30b6300d
--- /dev/null
+++ b/src/edit/features/App/AppWrapperHeader.css
@@ -0,0 +1,39 @@
+.AppWrapperHeader {
+ background-color: rgba(34, 34, 34, 0.95);
+ color: #ebebeb;
+
+ /*background-color: rgba(255, 255, 255, 0.95);*/
+ /*color: #222;*/
+
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
+
+ pointer-events: auto;
+
+ display: flex;
+ align-items: center;
+}
+
+.AppWrapperHeader-main {
+ flex: 1;
+}
+
+.AppWrapperHeader h1 {
+ text-align: center;
+ margin: 0;
+ padding: .5em 0 .4em;
+ font-size: 1.25rem;
+ font-weight: 100;
+}
+
+.controls {
+ margin: 0 15px;
+}
+
+.controls a{
+ color: #bbb;
+ text-decoration: none;
+}
+
+.controls a:hover{
+ color: white;
+}
\ No newline at end of file
diff --git a/src/edit/features/App/Icon.css b/src/edit/features/App/Icon.css
new file mode 100644
index 00000000..4d7b1ea0
--- /dev/null
+++ b/src/edit/features/App/Icon.css
@@ -0,0 +1,37 @@
+.Icon {
+ display: inline-block;
+
+ width: 20px;
+ height: 20px;
+
+ /*background: grey;*/
+ background-size: 100%;
+}
+
+.IconFullScreenOn {
+ background-image: url('/icon-fullscreen-on.svg');
+}
+
+.IconFullScreenOff {
+ background-image: url('/icon-fullscreen-off.svg');
+}
+
+.InvisibleButton {
+ background: none;
+ border: none;
+
+ outline: none;
+}
+
+.InvisibleButton {
+ width: 24px;
+ height: 24px;
+ padding: 0;
+ border-radius: 0;
+
+ cursor: pointer;
+}
+
+/*.InvisibleButton:focus {*/
+ /*border: 2px solid #2f9fff;*/
+/*}*/
\ No newline at end of file
diff --git a/src/edit/features/App/duck.js b/src/edit/features/App/duck.js
new file mode 100644
index 00000000..63da078a
--- /dev/null
+++ b/src/edit/features/App/duck.js
@@ -0,0 +1,107 @@
+import {combineReducers} from 'redux'
+import api from '../../../api'
+import {pack} from '../../../lib/fn'
+import {isMobile, isLandscape} from '../../../lib/device'
+
+const FETCH_PROJECTS = 'arch/app/FETCH_PROJECTS'
+const FOCUS_PROJECT = 'arch/app/FOCUS_PROJECT'
+const TOGGLE_FULL_PAGE = 'arch/app/TOGGLE_FULL_PAGE'
+const CHANGE_PAGE_ORIENTATION = 'arch/app/CHANGE_PAGE_ORIENTATION'
+
+export const PAGE_ORIENTATION_LANDSCAPE = 'landscape'
+export const PAGE_ORIENTATION_PORTRAIT = 'portrait'
+
+export function fetchProjects() {
+ return {
+ type: FETCH_PROJECTS,
+ async: api.projects.fetch()
+ .then(pack('data'))
+ }
+}
+
+export function focusProject(projectName) {
+ return {
+ type: FOCUS_PROJECT,
+ projectName
+ }
+}
+
+export function toggleFullPage() {
+ return {
+ type: TOGGLE_FULL_PAGE,
+ }
+}
+
+export function changePageOrientation(orientation) {
+ return {
+ type: CHANGE_PAGE_ORIENTATION,
+ orientation,
+ }
+}
+
+const init = {
+ items: [],
+ total: 0,
+ activeProject: null,
+}
+
+const initPage = {
+ fullPage: false,
+ halfPageAvailable: !isMobile(),
+ isVertical: !isLandscape(),
+}
+
+function projects(state = init, action) {
+ switch (action.type) {
+ case FETCH_PROJECTS: {
+ const {items, total} = action.data
+ return {...state, items, total}
+ }
+
+ case FOCUS_PROJECT: {
+ const projectName = action.projectName
+ const activeProject = state.items.find(p => p.name === projectName)
+
+ return {...state, activeProject}
+ }
+
+ default:
+ return state
+ }
+}
+
+function page(state = initPage, action) {
+ switch (action.type) {
+ case TOGGLE_FULL_PAGE: {
+ const fullPage = !state.fullPage
+
+ return {...state, fullPage}
+ }
+
+ case CHANGE_PAGE_ORIENTATION: {
+ const {orientation} = action
+ const isVertical = orientation === PAGE_ORIENTATION_PORTRAIT
+
+ return {...state, isVertical}
+ }
+
+ case FOCUS_PROJECT: {
+ let fullPage = state.fullPage
+
+ const projectName = action.projectName
+ fullPage = !projectName
+ ? false
+ : fullPage
+
+ return {...state, fullPage}
+ }
+
+ default:
+ return state
+ }
+}
+
+export default combineReducers({
+ projects,
+ page,
+})
diff --git a/src/edit/features/App/index.js b/src/edit/features/App/index.js
new file mode 100644
index 00000000..c6f09d36
--- /dev/null
+++ b/src/edit/features/App/index.js
@@ -0,0 +1 @@
+export {default} from './App'
\ No newline at end of file
diff --git a/src/edit/features/Editor/Draft.less b/src/edit/features/Editor/Draft.less
new file mode 100644
index 00000000..f6405bb3
--- /dev/null
+++ b/src/edit/features/Editor/Draft.less
@@ -0,0 +1,11 @@
+/**
+ * Draft v0.10.5
+ *
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:1}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) ". ";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) ". ";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) ". ";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) ". ";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) ". ";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}
\ No newline at end of file
diff --git a/src/edit/features/Editor/Editor.js b/src/edit/features/Editor/Editor.js
new file mode 100644
index 00000000..b68f0894
--- /dev/null
+++ b/src/edit/features/Editor/Editor.js
@@ -0,0 +1,313 @@
+import React from 'react'
+import Immutable from 'immutable'
+import {
+ DefaultDraftBlockRenderMap,
+ EditorState,
+ RichUtils,
+ convertFromRaw,
+ getDefaultKeyBinding,
+ AtomicBlockUtils,
+ Modifier
+} from 'draft-js'
+import DraftEditor, {composeDecorators} from 'draft-js-plugins-editor'
+
+import createImagePlugin from 'draft-js-image-plugin'
+import createAlignmentPlugin from 'draft-js-alignment-plugin'
+import createFocusPlugin from 'draft-js-focus-plugin'
+import createResizeablePlugin from 'draft-js-resizeable-plugin'
+import createBlockDndPlugin from 'draft-js-drag-n-drop-plugin'
+// import createDragNDropUploadPlugin from 'draft-js-drag-n-drop-upload-plugin'
+import createDndFileUploadPlugin from '@mikeljames/draft-js-drag-n-drop-upload-plugin'
+
+// import './Draft.less'
+import 'draft-js/dist/Draft.css'
+import 'draft-js-image-plugin/lib/plugin.css'
+
+const focusPlugin = createFocusPlugin()
+const resizeablePlugin = createResizeablePlugin()
+const blockDndPlugin = createBlockDndPlugin()
+const alignmentPlugin = createAlignmentPlugin()
+const {AlignmentTool} = alignmentPlugin
+
+const decorator = composeDecorators(
+ resizeablePlugin.decorator,
+ alignmentPlugin.decorator,
+ focusPlugin.decorator,
+ blockDndPlugin.decorator
+)
+const imagePlugin = createImagePlugin({decorator})
+
+const dndFileUploadPlugin = createDndFileUploadPlugin({
+ handleUpload: console.log,
+ addImage: imagePlugin.addImage,
+})
+// const dragNDropFileUploadPlugin = createDragNDropUploadPlugin({
+// handleUpload: mockUpload,
+// addImage: imagePlugin.addImage,
+// })
+
+const plugins = [
+ dndFileUploadPlugin,
+ blockDndPlugin,
+ focusPlugin,
+ alignmentPlugin,
+ resizeablePlugin,
+ imagePlugin
+]
+
+const initialState = {
+ 'entityMap': {
+ '0': {
+ 'type': 'IMAGE',
+ 'mutability': 'IMMUTABLE',
+ 'data': {
+ 'src': 'https://static.shlisselburg.org/art/images/7c206b4e211bb8486801fd84a3bf309b-big.jpg'
+ }
+ }
+ },
+ 'blocks': [
+ {
+ 'key': '9gm3s',
+ 'text': 'You can have images in your text field. This is a very rudimentary example, but you can enhance the image plugin with resizing, focus or alignment plugins.',
+ 'type': 'unstyled',
+ 'depth': 0,
+ 'inlineStyleRanges': [],
+ 'entityRanges': [],
+ 'data': {}
+ },
+ {
+ 'key': 'ov7r',
+ 'text': ' ',
+ 'type': 'atomic',
+ 'depth': 0,
+ 'inlineStyleRanges': [],
+ 'entityRanges': [{
+ 'offset': 0,
+ 'length': 1,
+ 'key': 0
+ }],
+ 'data': {}
+ },
+ {
+ 'key': 'e23a8',
+ 'text': 'See advanced examples further down …',
+ 'type': 'unstyled',
+ 'depth': 0,
+ 'inlineStyleRanges': [],
+ 'entityRanges': [],
+ 'data': {}
+ }
+ ]
+}
+
+class MyCustomBlock extends React.Component {
+ // constructor(props) {
+ // super(props)
+ // }
+
+ render() {
+ return (
+
+ {/* here, this.props.children contains a container, as that was the matching element */}
+ {this.props.children}
+
+ )
+ }
+}
+
+class MediaComponent extends React.Component {
+ render() {
+ const {block, contentState} = this.props
+ const {foo} = this.props.blockProps
+ const data = contentState.getEntity(block.getEntityAt(0)).getData()
+
+ console.log(data)
+
+ return (
+
+ {data.text}
+
+
+ )
+
+ // Return a or some other content using this data.
+ }
+}
+
+function blockRendererFn(contentBlock) {
+ const type = contentBlock.getType()
+
+ if (type === 'atomic') {
+ console.log('blockRendererFn', contentBlock.getKey(), type)
+
+ return {
+ component: MediaComponent,
+ editable: false,
+ props: {
+ foo: 'bar',
+ },
+ }
+ } else {
+ return null
+ }
+}
+
+const blockRenderMap = Immutable.Map({
+ 'section': {
+ element: 'section',
+ wrapper: MyCustomBlock,
+ }
+})
+
+// Include 'paragraph' as a valid block and updated the unstyled element but
+// keep support for other draft default block types
+const extendedBlockRenderMap = DefaultDraftBlockRenderMap.merge(blockRenderMap)
+
+export default class Editor extends React.Component {
+ constructor(props) {
+ super(props)
+
+ this.state = {
+ editorState: EditorState.createWithContent(convertFromRaw(initialState)),
+ }
+ this.onChange = this.onChange.bind(this)
+ this.onBoldClick = () => {
+ this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, 'BOLD'))
+ }
+ this.focus = () => {
+ this.editor.focus()
+ }
+
+ this.onZomboClick = () => {
+ const contentState = this.state.editorState.getCurrentContent();
+ const contentStateWithEntity = contentState.createEntity(
+ 'LINK',
+ 'MUTABLE',
+ {url: 'http://www.zombo.com'}
+ )
+ const entityKey = contentStateWithEntity.getLastCreatedEntityKey();
+ const contentStateWithLink = Modifier.applyEntity(
+ contentStateWithEntity,
+ selectionState,
+ entityKey
+ )
+ this.onChange(contentStateWithLink);
+
+ // this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, 'BOLD'))
+ }
+
+ this.handleKeyCommand = this.handleKeyCommand.bind(this)
+ this.keyBindingFn = this.keyBindingFn.bind(this)
+ this.insertBlock = this.insertBlock.bind(this)
+ }
+
+ insertBlock(type, data) {
+ const {editorState} = this.state
+ const contentState = editorState.getCurrentContent()
+ const contentStateWithEntity = contentState.createEntity(type, 'IMMUTABLE', data)
+ const entityKey = contentStateWithEntity.getLastCreatedEntityKey()
+
+ const newEditorState = EditorState.set(editorState, {
+ currentContent: contentStateWithEntity
+ })
+
+ this.setState({
+ editorState: AtomicBlockUtils.insertAtomicBlock(newEditorState, entityKey, ' '),
+ })
+ }
+
+ onChange(editorState) {
+ const content = editorState.getCurrentContent()
+ const s = editorState.getSelection()
+
+ const key = s.getStartKey()
+ const prevKey = content.getKeyBefore(key)
+
+ const block = content.getBlockForKey(key)
+ const prevBlock = content.getBlockForKey(prevKey)
+
+ const text = block.getText()
+ if (/\.jpg/.test(text)) {
+ this.insertBlock('jpg', {text})
+ // const newContent = Modifier.setBlockType(content, s, 'atomic')
+ //
+ // const newEditorState = EditorState.set(editorState, {
+ // currentContent: newContent,
+ // })
+ //
+ // this.setState({
+ // editorState: newEditorState,
+ // })
+ } else {
+ this.setState({editorState})
+ }
+
+ // const blockData = block.getData()
+
+ // console.log(block.getText(), block.getType())
+
+ // console.log(block.getEntityAt(0))
+ }
+
+ keyBindingFn(e) {
+ // console.log("K", e.key)
+
+ // if (e.key === 'Enter') {
+ // return 'enter'
+ // }
+ return getDefaultKeyBinding(e)
+ }
+
+ handleKeyCommand(command) {
+ console.log('CMD', command)
+ const newState = RichUtils.handleKeyCommand(this.state.editorState, command)
+
+ if (newState) {
+ this.onChange(newState)
+ return 'handled'
+ }
+
+ return 'not-handled'
+ }
+
+ render() {
+ const content = this.state.editorState.getCurrentContent()
+ const e = this.state.editorState
+
+ const s = e.getSelection()
+ const key = s.getStartKey()
+ const so = s.getStartOffset()
+ const block = content.getBlockForKey(key)
+
+ return (
+
+
{
+ this.editor = element
+ }}
+ />
+ {/* */}
+
+
+
+
+ block key: {key} type: {block.getType()}
+
+
+ start offset {so}
+
+
+ {content.getPlainText('\n')}
+
+
+
+ )
+ }
+}
diff --git a/src/edit/features/Editor/Editor.less b/src/edit/features/Editor/Editor.less
new file mode 100644
index 00000000..e69de29b
diff --git a/src/edit/features/Editor/index.js b/src/edit/features/Editor/index.js
new file mode 100644
index 00000000..f68b3486
--- /dev/null
+++ b/src/edit/features/Editor/index.js
@@ -0,0 +1 @@
+export {default} from './Editor'
\ No newline at end of file
diff --git a/src/edit/features/Marker/ContentEditable.js b/src/edit/features/Marker/ContentEditable.js
new file mode 100644
index 00000000..0825582a
--- /dev/null
+++ b/src/edit/features/Marker/ContentEditable.js
@@ -0,0 +1,78 @@
+import React, {Component} from 'react'
+
+export default class ContentEditable extends Component {
+ constructor(props) {
+ super(props)
+
+ this.emitChange = this.emitChange.bind(this)
+ this.onRef = this.onRef.bind(this)
+ }
+
+ getHtml() {
+ return this.props.children
+ }
+
+ onRef(element) {
+ this.htmlEl = element
+ }
+
+ emitChange() {
+ if (!this.htmlEl) return
+ const html = this.htmlEl.innerHTML
+
+ if (html !== this.lastHtml) this.props.onChange(html)
+ this.lastHtml = html
+ }
+
+ componentDidMount() {
+ this.htmlEl.focus()
+ }
+
+ shouldComponentUpdate(nextProps) {
+ let {props, htmlEl} = this
+
+ // We need not rerender if the change of props simply reflects the user's edits.
+ // Rerendering in this case would make the cursor/caret jump
+
+ // Rerender if there is no element yet... (somehow?)
+ if (!this.htmlEl) return true
+
+ // // ...or if html really changed... (programmatically, not by user edit)
+ // if (nextProps.html !== htmlEl.innerHTML && nextProps.html !== props.html) {
+ // return true
+ // }
+
+ return false
+
+ // let optional = ['style', 'className', 'disabled', 'tagName']
+ //
+ // // Handle additional properties
+ // return optional.some(name => props[name] !== nextProps[name])
+ }
+
+ componentDidUpdate() {
+ const html = this.getHtml()
+ if (this.htmlEl && this.htmlEl.innerHTML !== html) {
+ // Perhaps React (whose VDOM gets outdated because we often prevent
+ // rerendering) did not update the DOM. So we update it manually now.
+ this.htmlEl.innerHTML = html
+ }
+ }
+
+ render() {
+ const {mix} = this.props;
+
+ return
+ {this.getHtml()}
+
+ }
+}
diff --git a/src/edit/features/Marker/Marker.js b/src/edit/features/Marker/Marker.js
new file mode 100644
index 00000000..b0a01177
--- /dev/null
+++ b/src/edit/features/Marker/Marker.js
@@ -0,0 +1,214 @@
+import React, {Component} from 'react'
+import {MarkerTabIndex} from './MarkerTabIndex'
+import {MarkerCell} from './MarkerCell'
+
+import './Marker.less'
+import {exist} from '../../lib/fn'
+import ContentEditable from './ContentEditable'
+import {constrain} from "./lib/fn";
+
+export class Marker extends Component {
+ constructor(props) {
+ super(props)
+
+ this.state = {
+ currentCellIndex: 0,
+ }
+
+ this.onCellUpdate = this.onCellUpdate.bind(this)
+ this.onCellSelect = this.onCellSelect.bind(this)
+ this.onKeyDown = this.onKeyDown.bind(this)
+ }
+
+ onKeyDown(event) {
+ switch (event.key) {
+ case 'ArrowUp': {
+ console.log('Marker ArrowUp')
+
+ this.setState({
+ currentCellIndex: this.getPrevCellIndex(),
+ })
+ break
+ }
+
+ case 'ArrowDown': {
+ console.log('Marker ArrowDown')
+
+ this.setState({
+ currentCellIndex: this.getNextCellIndex(),
+ })
+ break
+ }
+
+ case 'Enter': {
+ console.log('Marker Enter')
+
+ const s = getSelection()
+ console.log(s, s.getRangeAt(0))
+
+ event.preventDefault()
+
+ // if (!event.shiftKey) return
+ // event.stopPropagation()
+
+ return this.handleEnter()
+ }
+ }
+ };
+
+ getCellIndex(n) {
+ const {data} = this.props
+ const {currentCellIndex} = this.state
+ const index = currentCellIndex + n
+
+ return constrain(index, 0, data.length - 1)
+ }
+
+ getPrevCellIndex(...args) {
+ return this.getCellIndex(-1, ...args)
+ }
+
+ getNextCellIndex(...args) {
+ return this.getCellIndex(1, ...args)
+ }
+
+ onCellSelect(index) {
+ this.setState({
+ currentCellIndex: index,
+ })
+ }
+
+ getDataAt(index) {
+ return this.props.data[index]
+ }
+
+ getBlankTextAt(index) {
+ if (index === 0) return ''
+
+ const cellBefore = this.getDataAt(index)
+ const textBefore = cellBefore.data
+
+ let text
+
+ const ol = (text) => {
+ const m = /^(\d+)\.\s/.exec(text)
+ if (m) {
+ const d = parseFloat(m[1])
+ return `${d + 1}.`
+ } else {
+ return null
+ }
+ }
+
+ const ul = (text) => /^-\s/.test(text)
+ ? '- '
+ : null
+
+ text = ol(textBefore)
+ if (text) return text
+
+ text = ul(textBefore)
+ if (text) return text
+
+ return ''
+ }
+
+ async handleEnter() {
+ const {currentCellIndex} = this.state
+ const currentCell = this.getDataAt(currentCellIndex)
+
+ if (currentCell.data) {
+ const nextCellIndex = currentCellIndex + 1
+
+ if (nextCellIndex > this.props.data.length - 1) {
+ const {data, marker, onUpdate} = this.props
+ const blankText = this.getBlankTextAt(currentCellIndex)
+ const newCell = await marker.blank({text: blankText})
+ const newData = [
+ ...data,
+ newCell,
+ ]
+
+ onUpdate(newData)
+ } else {
+
+ }
+
+ this.setState({
+ currentCellIndex: nextCellIndex,
+ })
+ }
+ }
+
+ async onCellUpdate(index, text) {
+ console.log('UPDATE', text)
+
+ const {data, marker, onUpdate} = this.props
+
+ const cells = await marker.evaluate(text)
+
+ const before = data.slice(0, index)
+ const after = data.slice(index + 1)
+
+ let newData = [
+ ...before,
+ ...cells,
+ ...after,
+ ]
+
+ // const next = index + cells.length
+ // if (next > newData.length - 1) {
+ // const newCell = await marker.blank()
+ // newData.push(newCell)
+ // }
+
+ console.log(newData.map(x => x.data).join('\n'))
+
+ onUpdate(newData)
+ }
+
+ componentWillMount() {
+ // this.setState({
+ // currentCellIndex: 0,
+ // })
+ }
+
+ render() {
+ const {data} = this.props
+ if (!data.length) return null
+
+ const {currentCellIndex} = this.state
+
+ const tabIndex = 1
+ return (
+
+ {data.map((x, i) => {
+ return (i === currentCellIndex ? (
+
this.onCellUpdate(i, text)}
+ >
+ {x.data}
+
+ ) : (
+
this.onCellSelect(i)}
+ >
+ {x.render()}
+
+ )
+ )
+ })}
+
+ )
+ }
+}
diff --git a/src/edit/features/Marker/Marker.less b/src/edit/features/Marker/Marker.less
new file mode 100644
index 00000000..7a29f89b
--- /dev/null
+++ b/src/edit/features/Marker/Marker.less
@@ -0,0 +1,52 @@
+.Marker {
+ //--active-color: #73acf6;
+ --active-color: #f0f0f0;
+ --cell-padding: 8px;
+ --font-size: 16px;
+
+ font-size: var(--font-size);
+ font-family: sans-serif;
+ //line-height: var(--font-size);
+
+ textarea {
+ width: 100%;
+ font-size: var(--font-size);
+ font-family: sans-serif;
+ padding: 0;
+
+ box-sizing: border-box;
+
+ height: var(--font-size);
+ //height: calc(2px + var(--font-size));
+ border: none;
+ background-color: var(--active-color);
+
+ outline: none;
+ display: block;
+ }
+}
+
+.MarkerCellTabIndex {
+ outline: none;
+}
+
+.MarkerCell {
+ //padding: var(--cell-padding);
+ padding-bottom: 8px;
+
+ position: relative;
+
+ &--active {
+ background-color: var(--active-color);
+ //background-color: #f6903b;
+ }
+
+ &--edit {
+ div {
+ outline: none;
+ }
+
+ //background-color: #00b7ec;
+ background-color: var(--active-color);
+ }
+}
\ No newline at end of file
diff --git a/src/edit/features/Marker/MarkerCell.js b/src/edit/features/Marker/MarkerCell.js
new file mode 100644
index 00000000..08e24678
--- /dev/null
+++ b/src/edit/features/Marker/MarkerCell.js
@@ -0,0 +1,72 @@
+import React, {Component} from 'react'
+import className from 'classnames'
+import {trimNewline} from './lib/fn'
+
+import './Marker.less'
+import {MarkerEdit} from './MarkerEdit'
+
+const Cell = ({children, active = false, edit = false}) => (
+
+ {children}
+
+)
+
+export class MarkerCell extends Component {
+ constructor(props) {
+ super(props)
+
+ this.onSubmit = this.onSubmit.bind(this)
+ this.onChange = this.onChange.bind(this)
+
+ this.state = {
+ content: null,
+ }
+ }
+
+ getCellData() {
+ return this.state.content
+ ? this.state.content
+ : this.props.cell.data
+ }
+
+ getCellComponent() {
+ return this.props.cell.render()
+ }
+
+ onSubmit(e) {
+ e.preventDefault()
+ const {onUpdate} = this.props
+ onUpdate(this.getCellData())
+ }
+
+ onChange(e) {
+ const content = trimNewline(e.target.value)
+
+ this.setState({
+ content,
+ })
+ }
+
+ render() {
+ const {active, edit} = this.props
+
+ return edit
+ ? (
+
+
+ {this.getCellData()}
+
+ |
+ ) : (
+
+ {this.getCellComponent()}
+ |
+ )
+ }
+}
diff --git a/src/edit/features/Marker/MarkerEdit.js b/src/edit/features/Marker/MarkerEdit.js
new file mode 100644
index 00000000..56600225
--- /dev/null
+++ b/src/edit/features/Marker/MarkerEdit.js
@@ -0,0 +1,85 @@
+import React, {Component, createContext} from 'react'
+import className from 'classnames'
+import {trim} from './lib/fn'
+import {MarkerContext} from './Marker'
+
+import './Marker.less'
+import ContentEditable from './ContentEditable'
+
+export class MarkerEdit extends Component {
+ constructor(props) {
+ super(props)
+
+ // this.onInputRef = this.onInputRef.bind(this)
+ this.onChange = this.onChange.bind(this)
+ this.onFocus = this.onFocus.bind(this)
+ this.onKeyDown = this.onKeyDown.bind(this)
+ }
+
+ onChange(event) {
+ console.log(event, event.target)
+ this.props.onChange(event)
+ }
+
+ onFocus(e) {
+ e.stopPropagation()
+ }
+
+ onKeyDown(event) {
+ switch (event.key) {
+ case 'ArrowUp': {
+ if (event.shiftKey) return
+ event.stopPropagation()
+ break
+ }
+
+ case 'ArrowDown': {
+ if (event.shiftKey) return
+ event.stopPropagation()
+ break
+ }
+
+ case 'Enter': {
+ console.log('MarkerEdit Enter')
+ if (event.shiftKey) return
+ // event.stopPropagation()
+
+ const {onSubmit} = this.props
+ onSubmit(event)
+ }
+ }
+ }
+
+ // onInputRef(e) {
+ // this.input = e
+ // }
+ //
+ // componentDidMount() {
+ // this.input.focus()
+ // }
+
+ render() {
+ const {children} = this.props
+
+ return (
+
+ {children}
+
+ )
+
+ // return (
+ //
+ // )
+ }
+}
diff --git a/src/edit/features/Marker/MarkerTabIndex.js b/src/edit/features/Marker/MarkerTabIndex.js
new file mode 100644
index 00000000..78730996
--- /dev/null
+++ b/src/edit/features/Marker/MarkerTabIndex.js
@@ -0,0 +1,43 @@
+import React, {Component, createContext} from 'react'
+
+import './Marker.less'
+
+export class MarkerTabIndex extends Component {
+ constructor(props) {
+ super(props)
+
+ this.onFocus = this.onFocus.bind(this)
+ this.onRef = this.onRef.bind(this)
+ }
+
+ onFocus() {
+ const {onFocus, data} = this.props
+ onFocus(data)
+ }
+
+ onRef(e) {
+ this.element = e
+ }
+
+ componentDidUpdate() {
+ const {focus} = this.props
+ if (focus) {
+ this.element.focus()
+ }
+ }
+
+ render() {
+ const {tabIndex, children} = this.props
+
+ return (
+
+ )
+ }
+}
diff --git a/src/edit/features/Marker/MarkerWidget.js b/src/edit/features/Marker/MarkerWidget.js
new file mode 100644
index 00000000..6ac76e00
--- /dev/null
+++ b/src/edit/features/Marker/MarkerWidget.js
@@ -0,0 +1,28 @@
+import React from 'react'
+
+import './Marker.less'
+
+export const MarkerWidgetText = ({text}) => (
+
+ {text}
+
+)
+
+export const MarkerWidgetHtml = ({html}) => (
+
+)
+
+export const MarkerWidgetUrl = ({url, text}) => (
+
+)
diff --git a/src/edit/features/Marker/index.js b/src/edit/features/Marker/index.js
new file mode 100644
index 00000000..e72f6c2a
--- /dev/null
+++ b/src/edit/features/Marker/index.js
@@ -0,0 +1 @@
+export {Marker as default} from './Marker'
diff --git a/src/edit/features/Marker/lib/fn.js b/src/edit/features/Marker/lib/fn.js
new file mode 100644
index 00000000..a0f15bbd
--- /dev/null
+++ b/src/edit/features/Marker/lib/fn.js
@@ -0,0 +1,31 @@
+/**
+ * Remove trailing spaces from string
+ *
+ * f(_x_) => x
+ *
+ * @param str
+ */
+export function trim(str) {
+ return str
+ .replace(/^\s+/, '')
+ .replace(/\s+$/, '')
+}
+
+/**
+ * Remove trailing spaces from string
+ *
+ * f(_x_) => x
+ *
+ * @param str
+ */
+export function trimNewline(str) {
+ return str
+ .replace(/^\n+/, '')
+ .replace(/\n+$/, '')
+}
+
+export function constrain(n, min, max) {
+ if (n < min) return min
+ if (n > max) return max
+ return n
+}
diff --git a/src/edit/features/Marker/lib/marker/FileToken.js b/src/edit/features/Marker/lib/marker/FileToken.js
new file mode 100644
index 00000000..95d32fe1
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/FileToken.js
@@ -0,0 +1,34 @@
+import React from 'react'
+
+import Token from './Token'
+import {trim} from '../fn'
+import {getHtml} from './index'
+
+
+export default class FileToken extends Token {
+ static test(data) {
+ return is_file(data, documentExtensions + imageExtensions)
+ }
+
+ constructor({data}) {
+ super({
+ name: 'file',
+ data,
+ })
+ this.joinable = false
+ }
+
+ async compile() {
+ const data = parse_file(this.getData())
+ const url = data['file']
+ const text = data.caption
+ ? data.caption
+ : url
+
+ return (
+
+ {text}
+
+ )
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/ImageToken.js b/src/edit/features/Marker/lib/marker/ImageToken.js
new file mode 100644
index 00000000..9bed61fe
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/ImageToken.js
@@ -0,0 +1,78 @@
+import React from 'react'
+
+import Token from './Token'
+import {isImage, parseFile} from './index'
+
+export class ImageToken extends Token {
+ static test(data) {
+ return isImage(data)
+ }
+
+ constructor({data}) {
+ super({
+ name: 'image',
+ data,
+ })
+ this.joinable = true
+ this.build = null
+ }
+
+ merge(token) {
+ const mergedToken = new ImageCollectionToken([this.data, token.data])
+ mergedToken.build = this.build
+ return mergedToken
+ }
+
+ async compile() {
+
+ }
+}
+
+export class ImageCollectionToken extends ImageToken {
+ constructor({data}) {
+ super({data})
+ this.name = 'image_collection'
+ this.build = null
+ }
+
+ merge(token) {
+ const data = Array.isArray(token.getData())
+ ? token.getData()
+ : [token.getData()]
+
+ const mergedToken = new ImageCollectionToken({
+ data: [...self.getData(), ...data]
+ })
+ mergedToken.build = self.build
+ return mergedToken
+ }
+
+ async compile() {
+ const data = this.parseData()
+ let images = []
+ for (let x of data) {
+ const img = await this.build(x)
+ images.push(img)
+ }
+
+ return (
+
+
+ {images.map(({src}) => (
+

+ ))}
+
+
+ )
+ }
+
+ parseData() {
+ return this
+ .getData()
+ .map(parseFile)
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/Marker.js b/src/edit/features/Marker/lib/marker/Marker.js
new file mode 100644
index 00000000..fdd34475
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/Marker.js
@@ -0,0 +1,138 @@
+import SplitToken from './SplitToken'
+
+export class Marker {
+ constructor() {
+ this.tokenFactories = []
+ this.treeMiddlewares = []
+
+ this.join = true
+ this.blankFactory = null
+ }
+
+ async blank({text}) {
+ if (!this.blankFactory) {
+ throw new Error(`Blank factory is not defined`)
+ }
+ const token = await this.blankFactory.create(text)
+ return token.compile()
+ }
+
+ addTokenFactory(tokenFactory, {blank = false} = {}) {
+ this.tokenFactories.push(tokenFactory)
+ if (blank) {
+ this.blankFactory = tokenFactory
+ }
+ return this
+ }
+
+ addTreeMiddleware(callback) {
+ this.treeMiddlewares.push(callback)
+ return this
+ }
+
+ async evaluate(text) {
+ let tokens = text.split('\n')
+ tokens = this.markupTokens(tokens)
+ if (this.join) {
+ tokens = this.joinTokens(tokens)
+ }
+
+ return compileTokens(tokens)
+ // tree = lxml.html.fromstring(compiled)
+ // return await self.process_tree(tree)
+ }
+
+ joinTokens(tokens) {
+ return mergeTokens(joinTokens(tokens))
+ }
+
+ async processTree(tree) {
+ // for fn in self.treeMiddlewares:
+ // tree = await fn(tree)
+ // return tree
+ }
+
+ markupTokens(tokens) {
+ const markedTokens = []
+
+ tokens.forEach(data => {
+ const token = this.createToken(data)
+ if (!token) {
+ throw new Error(`Token not recognized for data ${data}`)
+ }
+
+ markedTokens.push(token)
+ })
+
+ return markedTokens
+ }
+
+ createToken(data) {
+ for (let factory of this.tokenFactories) {
+ if (factory.test(data)) {
+ return factory.create(data)
+ }
+ }
+
+ return null
+ }
+}
+
+function joinTokens(tokens) {
+ const isSplit = x => x instanceof SplitToken
+
+ let bufferTag = null
+ let tokensBuffer = []
+ let tokensList = []
+ for (let token of tokens) {
+ const tag = token.name
+ const changed = bufferTag !== null && tag !== bufferTag
+
+ let flush = isSplit(token)
+ if (changed) {
+ flush = true
+ }
+
+ if (!token.isJoinable()) {
+ flush = true
+ }
+
+ if (flush) {
+ if (tokensBuffer.length) {
+ tokensList.push(tokensBuffer)
+ }
+
+ if (isSplit(token)) {
+ tokensBuffer = []
+ bufferTag = null
+ } else {
+ tokensBuffer = [token]
+ bufferTag = tag
+ }
+ } else {
+ bufferTag = tag
+ tokensBuffer.push(token)
+ }
+ }
+
+ if (tokensBuffer.length) {
+ tokensList.push(tokensBuffer)
+ }
+
+ return tokensList
+}
+
+function mergeTokens(tokensList) {
+ return tokensList
+ .map(ts => ts
+ .reduce(
+ (token, x) => token.merge(x)
+ )
+ )
+}
+
+async function compileTokens(tokens) {
+ return Promise.all(
+ tokens.map(x => x.compile())
+ )
+}
diff --git a/src/edit/features/Marker/lib/marker/SplitToken.js b/src/edit/features/Marker/lib/marker/SplitToken.js
new file mode 100644
index 00000000..fc7e800e
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/SplitToken.js
@@ -0,0 +1,24 @@
+import Token from './Token'
+import {trim} from '../fn'
+
+export default class SplitToken extends Token {
+ static test(data) {
+ data = trim(data)
+ return data === ''
+ }
+
+ constructor(options) {
+ super({
+ ...options,
+ name: 'split',
+ })
+ }
+
+ render() {
+ return null
+ }
+
+ merge(token) {
+ return this
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/TextToken.js b/src/edit/features/Marker/lib/marker/TextToken.js
new file mode 100644
index 00000000..602c6915
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/TextToken.js
@@ -0,0 +1,44 @@
+import Token from './Token'
+import {trim} from '../fn'
+import {getHtml} from './index'
+
+export default class TextToken extends Token {
+ static test(data) {
+ return true
+ }
+
+ constructor(options) {
+ super({
+ ...options,
+ name: 'text',
+ })
+ }
+
+ merge(token) {
+ const data = [this.data, token.data].join('\n')
+
+ return new TextToken(this.getMergeOptions({
+ data: trim(data),
+ }))
+ }
+
+ async getData() {
+ const html = getHtml(this.data)
+ return {html}
+ }
+
+ // async compile() {
+ // // return getHtml(this.getData())
+ //
+ //
+ //
+ //
+ //
+ // return (
+ //
+ // )
+ // }
+}
diff --git a/src/edit/features/Marker/lib/marker/Token.js b/src/edit/features/Marker/lib/marker/Token.js
new file mode 100644
index 00000000..880964b9
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/Token.js
@@ -0,0 +1,51 @@
+export default class Token {
+ static test(data) {
+ return true
+ }
+
+ constructor({name, data, component}) {
+ this.name = name
+ this.data = data
+ this.component = component
+ this.joinable = true
+
+ this.compiledData = null
+ }
+
+ isJoinable() {
+ return this.joinable
+ }
+
+ render() {
+ if (!this.compiledData) {
+ throw new Error('Token not compiled. Call Token::compile before.')
+ }
+ return this.component(this.compiledData)
+ }
+
+ async getData() {
+ return this.data
+ }
+
+ async compile() {
+ this.compiledData = await this.getData()
+ return this
+ }
+
+ merge(token) {
+ return this
+ }
+
+ getMergeOptions(extend) {
+ return {
+ name: this.name,
+ data: this.data,
+ component: this.component,
+ ...extend,
+ }
+ }
+
+ toString() {
+ return `[Token ${this.name} ${this.data}]`
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/TokenFactory.js b/src/edit/features/Marker/lib/marker/TokenFactory.js
new file mode 100644
index 00000000..64029f5b
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/TokenFactory.js
@@ -0,0 +1,35 @@
+export class TokenFactory {
+ constructor({token, component}) {
+ this.token = token
+ this.component = component
+ }
+
+ test(sample) {
+ return this.token.test(sample)
+ }
+
+ create(data) {
+ const Token = this.token
+ return new Token({
+ data,
+ component: this.component,
+ })
+ }
+}
+
+export class BuildTokenFactory extends TokenFactory {
+ constructor({token, build, component}) {
+ super({token})
+ this.build = build
+ this.component = component
+ }
+
+ create(data) {
+ const Token = this.token
+ return new Token({
+ data,
+ component: this.component,
+ build: this.build,
+ })
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/UrlToken.js b/src/edit/features/Marker/lib/marker/UrlToken.js
new file mode 100644
index 00000000..e8e1da29
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/UrlToken.js
@@ -0,0 +1,16 @@
+import Token from './Token'
+import {isUrl} from './index'
+
+export default class UrlToken extends Token {
+ static test(data) {
+ return isUrl(data)
+ }
+
+ constructor(options) {
+ super({
+ ...options,
+ name: 'url',
+ })
+ this.joinable = false
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/YoutubeToken.js b/src/edit/features/Marker/lib/marker/YoutubeToken.js
new file mode 100644
index 00000000..d575f672
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/YoutubeToken.js
@@ -0,0 +1,24 @@
+import {isUrl} from './index'
+import React from 'react'
+import UrlToken from './UrlToken'
+
+export default class YoutubeToken extends UrlToken {
+ static test(data) {
+ if (!isUrl(data)) {
+ return false
+ }
+
+ const url = new URL(data)
+ return ['www.youtube.com', 'youtube.com']
+ .includes(url.hostname)
+ }
+
+ async getData() {
+ const url = new URL(this.data)
+
+ const youtubeId = url.searchParams.get('v')
+ return {
+ url: `//www.youtube.com/embed/${youtubeId}`
+ }
+ }
+}
diff --git a/src/edit/features/Marker/lib/marker/index.js b/src/edit/features/Marker/lib/marker/index.js
new file mode 100644
index 00000000..a35e88d1
--- /dev/null
+++ b/src/edit/features/Marker/lib/marker/index.js
@@ -0,0 +1,76 @@
+import {markdown} from 'markdown'
+
+const {toHTML: markdownToHtml} = markdown
+
+const splitExt = s => {
+ const parts = s.split('.')
+ const name = parts.splice(0, parts.length - 1)
+ const ext = parts[parts.length - 1]
+ return {name, ext}
+}
+
+export const imageExtensions = ['.jpg', '.jpeg', '.png']
+export const documentExtensions = ['.doc', '.docx', '.pdf', '.xls', '.xlsx']
+
+export function getHtml(text) {
+ return markdownToHtml(text)
+}
+
+export function isUrl(sample) {
+ try {
+ return Boolean(new URL(sample))
+ } catch (e) {
+ return false
+ }
+}
+
+export function isImage(sample) {
+ const file = parseFile(sample)['file']
+ return isFile(file, imageExtensions)
+}
+
+export function isDocument(sample) {
+ const file = parseFile(sample)['file']
+ return isFile(file, documentExtensions)
+}
+
+export function isFile(sample, extensions) {
+ let {name, ext} = splitExt(sample)
+ ext = ext.toLowerCase()
+ return extensions.include(ext)
+}
+
+export function parseFile(sample) {
+ const re = /)/
+ const p = re.exec(sample)
+ let caption
+ let file
+ if (p) {
+ caption = p.group(1)
+ file = p.group(2)
+ } else {
+ sample = sample.split(' ')
+ file = sample[0]
+ caption = ' '.join(sample.substr(1))
+ }
+
+ return {
+ file,
+ caption,
+ }
+}
+
+export function parseLink(sample) {
+ const re = /)/
+ const p = re.exec(sample)
+
+ if (!p) {
+ return null
+ }
+
+ const url = p[2]
+ return {
+ url: new URL(url),
+ alt: p[1],
+ }
+}
diff --git a/src/edit/index.css b/src/edit/index.css
new file mode 100644
index 00000000..36944367
--- /dev/null
+++ b/src/edit/index.css
@@ -0,0 +1,35 @@
+:root {
+ --content-width-state-normal: 60%;
+ --content-width-state-full: 100%;
+ --content-width: var(--content-width-state-normal);
+
+ --module-m: .5em;
+}
+
+html, body, #root {
+ width: 100%;
+ height: 100%;
+
+ position: absolute;
+
+ background-color: #222;
+
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-family: "Input Sans Compressed", sans-serif;
+}
+
+.leaflet-container {
+ height: 100%;
+ /*height: 100px;*/
+ width: 100%;
+
+ background-color: white;
+}
+
+h1 {
+ font-size: 1.25em;
+}
\ No newline at end of file
diff --git a/src/edit/index.js b/src/edit/index.js
new file mode 100644
index 00000000..36c29b1f
--- /dev/null
+++ b/src/edit/index.js
@@ -0,0 +1,55 @@
+import React from 'react'
+import App from './features/App'
+
+// import {createDevTools} from 'redux-devtools'
+// import LogMonitor from 'redux-devtools-log-monitor'
+// import DockMonitor from 'redux-devtools-dock-monitor'
+
+import {Provider} from 'react-redux'
+import reducer from './reducers'
+import effects from './effects'
+
+import {create} from './store'
+
+import {Router, Route, browserHistory} from 'react-router'
+import {syncHistoryWithStore} from 'react-router-redux'
+
+const initialState = {}
+
+// const DevTools = createDevTools(
+//
+//
+//
+// )
+
+const store = create(reducer, initialState, [
+ // DevTools.instrument()
+], effects())
+// const history = syncHistoryWithStore(browserHistory, store)
+
+export default function (marker, data) {
+ // return (
+ //
+ // )
+
+ return (
+
+
+
+ {/*
*/}
+ {/**/}
+
+ {/**/}
+ {/**/}
+
+ {/*
*/}
+
+
+ )
+}
diff --git a/src/edit/lib/LeafletPattern.js b/src/edit/lib/LeafletPattern.js
new file mode 100644
index 00000000..c1022cd2
--- /dev/null
+++ b/src/edit/lib/LeafletPattern.js
@@ -0,0 +1,516 @@
+import L from 'leaflet'
+
+/*
+ Leaflet.pattern, Provides tools to set the backgrounds of vector shapes in Leaflet to be patterns.
+ https://github.com/teastman/Leaflet.pattern
+ (c) 2015, Tyler Eastman
+ */
+(function (window, document) {
+ /*
+ * L.Pattern is the base class for fill patterns for leaflet Paths.
+ */
+
+ L.Pattern = L.Class.extend({
+ // includes: [L.Mixin.Events],
+ includes: [L.Evented],
+
+ options: {
+ x: 0,
+ y: 0,
+ width: 8,
+ height: 8,
+ patternUnits: 'userSpaceOnUse',
+ patternContentUnits: 'userSpaceOnUse'
+ // angle: <0 - 360>
+ // patternTransform:
+ },
+
+ _addShapes: L.Util.falseFn,
+ _update: L.Util.falseFn,
+
+ initialize: function (options) {
+ this._shapes = {};
+ L.setOptions(this, options);
+ },
+
+ onAdd: function (map) {
+ this._map = map.target ? map.target : map;
+ this._map._initDefRoot();
+
+ // Create the DOM Object for the pattern.
+ this._initDom();
+
+ // Any shapes that were added before this was added to the map need to have their onAdd called.
+ // for (let i of this._shapes) {
+ // i.onAdd(this);
+ // }
+ Object
+ .values(this._shapes)
+ .forEach(x => x.onAdd(this))
+
+ // Call any children that want to add their own shapes.
+ this._addShapes();
+
+ // Add the DOM Object to the DOM Tree
+ this._addDom();
+ this.redraw();
+
+ if (this.getEvents) {
+ this._map.on(this.getEvents(), this);
+ }
+ this.fire('add');
+ this._map.fire('patternadd', {pattern: this});
+ },
+
+ onRemove: function () {
+ this._removeDom();
+ },
+
+ redraw: function () {
+ if (this._map) {
+ this._update();
+ // for (let i of this._shapes) {
+ // i.redraw();
+ // }
+ Object
+ .values(this._shapes)
+ .forEach(x => x.redraw())
+ }
+ return this;
+ },
+
+ setStyle: function (style) {
+ L.setOptions(this, style);
+ if (this._map) {
+ this._updateStyle();
+ this.redraw();
+ }
+ return this;
+ },
+
+ addTo: function (map) {
+ map.addPattern(this);
+ return this;
+ },
+
+ remove: function () {
+ return this.removeFrom(this._map);
+ },
+
+ removeFrom: function (map) {
+ if (map) {
+ map.removePattern(this);
+ }
+ return this;
+ }
+ });
+
+ L.Map.addInitHook(function () {
+ this._patterns = {};
+ });
+
+ L.Map.include({
+ addPattern: function (pattern) {
+ var id = L.stamp(pattern);
+ if (this._patterns[id]) { return pattern; }
+ this._patterns[id] = pattern;
+
+ this.whenReady(pattern.onAdd, pattern);
+ return this;
+ },
+
+ removePattern: function (pattern) {
+ var id = L.stamp(pattern);
+ if (!this._patterns[id]) { return this; }
+
+ if (this._loaded) {
+ pattern.onRemove(this);
+ }
+
+ if (pattern.getEvents) {
+ this.off(pattern.getEvents(), pattern);
+ }
+
+ delete this._patterns[id];
+
+ if (this._loaded) {
+ this.fire('patternremove', {pattern: pattern});
+ pattern.fire('remove');
+ }
+
+ pattern._map = null;
+ return this;
+ },
+
+ hasPattern: function (pattern) {
+ return !!pattern && (L.stamp(pattern) in this._patterns);
+ }
+ });
+
+
+
+ L.Pattern.SVG_NS = 'http://www.w3.org/2000/svg';
+
+ L.Pattern = L.Pattern.extend({
+ _createElement: function (name) {
+ return document.createElementNS(L.Pattern.SVG_NS, name);
+ },
+
+ _initDom: function () {
+ this._dom = this._createElement('pattern');
+ if (this.options.className) {
+ L.DomUtil.addClass(this._dom, this.options.className);
+ }
+ this._updateStyle();
+ },
+
+ _addDom: function () {
+ this._map._defRoot.appendChild(this._dom);
+ },
+
+ _removeDom: function () {
+ L.DomUtil.remove(this._dom);
+ },
+
+ _updateStyle: function () {
+ var dom = this._dom,
+ options = this.options;
+
+ if (!dom) { return; }
+
+ dom.setAttribute('id', L.stamp(this));
+ dom.setAttribute('x', options.x);
+ dom.setAttribute('y', options.y);
+ dom.setAttribute('width', options.width);
+ dom.setAttribute('height', options.height);
+ dom.setAttribute('patternUnits', options.patternUnits);
+ dom.setAttribute('patternContentUnits', options.patternContentUnits);
+
+ if (options.patternTransform || options.angle) {
+ var transform = options.patternTransform ? options.patternTransform + " " : "";
+ transform += options.angle ? "rotate(" + options.angle + ") " : "";
+ dom.setAttribute('patternTransform', transform);
+ }
+ else {
+ dom.removeAttribute('patternTransform');
+ }
+
+ // for (let i of this._shapes) {
+ // i._updateStyle();
+ // }
+
+ Object
+ .values(this._shapes)
+ .forEach(x => x._updateStyle())
+ }
+ });
+
+ L.Map.include({
+ _initDefRoot: function () {
+ if (!this._defRoot) {
+ if (typeof this.getRenderer === 'function') {
+ var renderer = this.getRenderer(this);
+ this._defRoot = L.Pattern.prototype._createElement('defs');
+ renderer._container.appendChild(this._defRoot);
+ } else {
+ if (!this._pathRoot) {
+ this._initPathRoot();
+ }
+ this._defRoot = L.Pattern.prototype._createElement('defs');
+ this._pathRoot.appendChild(this._defRoot);
+ }
+ }
+ }
+ });
+
+ if (L.SVG) {
+ L.SVG.include({
+ _superUpdateStyle: L.SVG.prototype._updateStyle,
+
+ _updateStyle: function (layer) {
+ this._superUpdateStyle(layer);
+
+ if (layer.options.fill && layer.options.fillPattern) {
+ layer._path.setAttribute('fill', 'url(#' + L.stamp(layer.options.fillPattern) + ")");
+ }
+ }
+ });
+ }
+ else {
+ L.Path.include({
+ _superUpdateStyle: L.Path.prototype._updateStyle,
+
+ _updateStyle: function () {
+ this._superUpdateStyle();
+
+ if (this.options.fill && this.options.fillPattern) {
+ this._path.setAttribute('fill', 'url(#' + L.stamp(this.options.fillPattern) + ")");
+ }
+ }
+ });
+ }
+
+
+ /*
+ * L.StripePattern is an implementation of Pattern that creates stripes.
+ */
+
+ L.StripePattern = L.Pattern.extend({
+
+ options: {
+ weight: 4,
+ spaceWeight: 4,
+ color: '#000000',
+ spaceColor: '#ffffff',
+ opacity: 1.0,
+ spaceOpacity: 0.0
+ },
+
+ _addShapes: function () {
+ this._stripe = new L.PatternPath({
+ stroke: true,
+ weight: this.options.weight,
+ color: this.options.color,
+ opacity: this.options.opacity
+ });
+
+ this._space = new L.PatternPath({
+ stroke: true,
+ weight: this.options.spaceWeight,
+ color: this.options.spaceColor,
+ opacity: this.options.spaceOpacity
+ });
+
+ this.addShape(this._stripe);
+ this.addShape(this._space);
+
+ this._update();
+ },
+
+ _update: function () {
+ this._stripe.options.d = 'M0 ' + this._stripe.options.weight / 2 + ' H ' + this.options.width;
+ this._space.options.d = 'M0 ' + (this._stripe.options.weight + this._space.options.weight / 2) + ' H ' + this.options.width;
+ },
+
+ setStyle: L.Pattern.prototype.setStyle
+ });
+
+ L.stripePattern = function (options) {
+ return new L.StripePattern(options);
+ };
+
+ /*
+ * L.PatternShape is the base class that is used to define the shapes in Patterns.
+ */
+
+ L.PatternShape = L.Class.extend({
+
+ options: {
+ stroke: true,
+ color: '#3388ff',
+ weight: 3,
+ opacity: 1,
+ lineCap: 'round',
+ lineJoin: 'round',
+ // dashArray: null
+ // dashOffset: null
+
+ // fill: false
+ // fillColor: same as color by default
+ fillOpacity: 0.2,
+ fillRule: 'evenodd',
+ // fillPattern: L.Pattern
+ },
+
+ initialize: function (options) {
+ L.setOptions(this, options);
+ },
+
+ // Called when the parent Pattern get's added to the map,
+ // or when added to a Pattern that is already on the map.
+ onAdd: function (pattern) {
+ this._pattern = pattern;
+ if (this._pattern._dom) {
+ this._initDom(); // This function is implemented by it's children.
+ this._addDom();
+ }
+ },
+
+ addTo: function (pattern) {
+ pattern.addShape(this);
+ return this;
+ },
+
+ redraw: function () {
+ if (this._pattern) {
+ this._updateShape(); // This function is implemented by it's children.
+ }
+ return this;
+ },
+
+ setStyle: function (style) {
+ L.setOptions(this, style);
+ if (this._pattern) {
+ this._updateStyle();
+ }
+ return this;
+ },
+
+ setShape: function (shape) {
+ this.options = L.extend({}, this.options, shape);
+ this._updateShape();
+ },
+ });
+
+ L.Pattern.include({
+ addShape: function (shape) {
+ var id = L.stamp(shape);
+ if (this._shapes[id]) { return shape; }
+ this._shapes[id] = shape;
+ shape.onAdd(this);
+ }
+ });
+
+
+
+ L.PatternShape.SVG_NS = 'http://www.w3.org/2000/svg';
+
+ L.PatternShape = L.PatternShape.extend({
+ _createElement: function (name) {
+ return document.createElementNS(L.PatternShape.SVG_NS, name);
+ },
+
+ _initDom: L.Util.falseFn,
+ _updateShape: L.Util.falseFn,
+
+ _initDomElement: function (type) {
+ this._dom = this._createElement(type);
+ if (this.options.className) {
+ L.DomUtil.addClass(this._dom, this.options.className);
+ }
+ this._updateStyle();
+ },
+
+ _addDom: function () {
+ this._pattern._dom.appendChild(this._dom);
+ },
+
+ _updateStyle: function () {
+ var dom = this._dom,
+ options = this.options;
+
+ if (!dom) { return; }
+
+ if (options.stroke) {
+ dom.setAttribute('stroke', options.color);
+ dom.setAttribute('stroke-opacity', options.opacity);
+ dom.setAttribute('stroke-width', options.weight);
+ dom.setAttribute('stroke-linecap', options.lineCap);
+ dom.setAttribute('stroke-linejoin', options.lineJoin);
+
+ if (options.dashArray) {
+ dom.setAttribute('stroke-dasharray', options.dashArray);
+ } else {
+ dom.removeAttribute('stroke-dasharray');
+ }
+
+ if (options.dashOffset) {
+ dom.setAttribute('stroke-dashoffset', options.dashOffset);
+ } else {
+ dom.removeAttribute('stroke-dashoffset');
+ }
+ } else {
+ dom.setAttribute('stroke', 'none');
+ }
+
+ if (options.fill) {
+ if (options.fillPattern) {
+ dom.setAttribute('fill', 'url(#' + L.stamp(options.fillPattern) + ")");
+ }
+ else {
+ dom.setAttribute('fill', options.fillColor || options.color);
+ }
+ dom.setAttribute('fill-opacity', options.fillOpacity);
+ dom.setAttribute('fill-rule', options.fillRule || 'evenodd');
+ } else {
+ dom.setAttribute('fill', 'none');
+ }
+
+ dom.setAttribute('pointer-events', options.pointerEvents || (options.interactive ? 'visiblePainted' : 'none'));
+ }
+ });
+
+
+
+ /*
+ * L.PatternPath is the implementation of PatternShape for adding Paths
+ */
+
+ L.PatternPath = L.PatternShape.extend({
+// options: {
+ // d: