diff --git a/.gitignore b/.gitignore index 962d4ba..b871ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ permdir/ node_modules/ package-lock.json data + +.idea/ +.vscode/ \ No newline at end of file diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 41c8a2b..bad47b0 --- a/README.md +++ b/README.md @@ -1,34 +1,40 @@ -# R - -Upload file service with react. It's [P](https://github.com/qingfeng/p)'s (react + es6+) version - -Douban Intra Service http://r.dapps.douban.com/ - -# Demo - -The [R Demo](https://vast-brushlands-4477.herokuapp.com) showcases `r`. - -# Get Started - -```shell -git clone https://github.com/dongweiming/r -cd r -virtualenv venv -source venv/bin/activate -pip install -r requirements.txt -mkdir permdir -./setup_databases.sh -python app.py -open http://localhost:5000 -``` - -# Command Line - -Example: - -* Command line: ``curl -F file=@"/tmp/1.png" http://p.dapps.douban.com/`` -* Command line: ``curl -F file=@"/tmp/1.png" -F w=100 -F h=100 http://p.dapps.douban.com/`` -* Resize image: ``http://p.dapps.douban.com/r/img_hash.jpg?w=300&h=200`` -* Affine Transformation: - ``http://p.dapps.douban.com/a/img_hash.jpg?w=300&h=300&a=0.86,0.5,-100,-0.5,0.86,50`` - (Rotate 30 degree clockwise and then translation 100 right, 50 up.) +# R + +Upload file service with react. It's [P](https://github.com/qingfeng/p)'s (react + es6+) version + +Douban Intra Service http://r.dapps.douban.com/ + +# Demo + +The [R Demo](https://vast-brushlands-4477.herokuapp.com) showcases `r`. + +# Get Started + +```shell +git clone https://github.com/dongweiming/r +cd r +virtualenv -p python3 venv +source venv/bin/activate +pip install -r requirements.txt +mkdir permdir +./setup_databases.sh +python app.py +open http://localhost:5000 +``` + +# Command Line + +Example: + +- Command line: `curl -F file=@"/tmp/1.png" http://p.dapps.douban.com/` +- Command line: `curl -F file=@"/tmp/1.png" -F w=100 -F h=100 http://p.dapps.douban.com/` +- Resize image: `http://p.dapps.douban.com/r/img_hash.jpg?w=300&h=200` +- Affine Transformation: + `http://p.dapps.douban.com/a/img_hash.jpg?w=300&h=300&a=0.86,0.5,-100,-0.5,0.86,50` + (Rotate 30 degree clockwise and then translation 100 right, 50 up.) + +# FAQ + +## Problems importing magic on Windows 64-bit + +Drop the [dlls](https://github.com/pidydx/libmagicwin64) to `C:\Windows\System32` and python magic will import correctly. diff --git a/app.py b/app.py old mode 100644 new mode 100755 index c5b00af..05f07b1 --- a/app.py +++ b/app.py @@ -1,371 +1,192 @@ -# coding=utf-8 -import os -import uuid -import magic -import urllib -import json -from random import choice -from string import digits, ascii_uppercase, ascii_lowercase -from datetime import datetime - -import cropresize2 -from flask import abort, Flask, request, jsonify, redirect, send_file -from flask.ext.mako import MakoTemplates, render_template -from flask.ext.sqlalchemy import SQLAlchemy -from PIL import Image - -from mimes import IMAGE_MIMES, AUDIO_MIMES, VIDEO_MIMES - -RANDOM_SEQ = ascii_uppercase + ascii_lowercase + digits - -app = Flask(__name__) -app.config.from_object("config") -debug = app.config["DEBUG"] -if debug: - from werkzeug import SharedDataMiddleware - app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { - '/i/': os.path.join( - os.path.dirname(__file__), app.config["UPLOAD_FOLDER"]) - }) -mako = MakoTemplates(app) -db = SQLAlchemy(app) - -command_agent_keys = ['curl', 'wget'] - - -class PasteFile(db.Model): - __tablename__ = "PasteFile" - id = db.Column(db.Integer, primary_key=True) - filename = db.Column(db.String(5000), nullable=False) - filehash = db.Column(db.String(128), nullable=False, unique=True) - uploadTime = db.Column(db.DateTime, nullable=False) - mimetype = db.Column(db.String(256), nullable=False) - # collation is for case-sensitive select - symlink = db.Column( - db.String(50, collation='utf8_bin'), nullable=False, unique=True) - size = db.Column(db.Integer, nullable=False) - - def __init__(self, filename="", mimetype="application/octet-stream", - size=0, filehash=None, symlink=None): - self.uploadTime = datetime.now() - self.mimetype = mimetype - self.size = int(size) - self.filehash = filehash if filehash else self._hash_filename(filename) - self.filename = filename if filename else self.filehash - self.symlink = symlink if symlink else self._gen_symlink() - - @staticmethod - def _hash_filename(filename): - _, _, suffix = filename.rpartition('.') - return "%s.%s" % (uuid.uuid4().hex, suffix) - - @staticmethod - def _gen_symlink(): - return "".join(choice(RANDOM_SEQ) for x in range(6)) - - @classmethod - def get_by_filehash(cls, filehash): - return cls.query.filter_by(filehash=filehash).first() - - @classmethod - def get_by_symlink(cls, symlink): - return cls.query.filter_by(symlink=symlink).first() - - @classmethod - def create_by_uploadFile(cls, uploadedFile): - # emmm. I'll fill this value later. - rst = cls(uploadedFile.filename, uploadedFile.mimetype, 0) - uploadedFile.save(rst.path) - filestat = os.stat(rst.path) - rst.size = filestat.st_size - return rst - - @classmethod - def create_file_after_crop(cls, uploadedFile, width, height): - assert uploadedFile.is_image, TypeError("Unsupported Image Type.") - - img = cropresize2.crop_resize( - Image.open(uploadedFile), (int(width), int(height))) - rst = cls(uploadedFile.filename, uploadedFile.mimetype, 0) - img.save(rst.path) - - filestat = os.stat(rst.path) - rst.size = filestat.st_size - - return rst - - @classmethod - def create_by_old_paste(cls, filehash, symlink): - filepath = os.path.join(app.config["UPLOAD_FOLDER"], filehash) - mimetype = magic.from_file(filepath, mime=True) - filestat = os.stat(filepath) - size = filestat.st_size - - rst = cls(filehash, mimetype, size, filehash=filehash, symlink=symlink) - return rst - - @property - def path(self): - return os.path.join(app.config["UPLOAD_FOLDER"], self.filehash) - - @property - def url_i(self): - return "http://{host}/i/{filehash}".format( - host=request.host, filehash=self.filehash) - - @property - def url_p(self): - return "http://{host}/p/{filehash}".format( - host=request.host, filehash=self.filehash) - - @property - def url_s(self): - return "http://{host}/s/{symlink}".format( - host=request.host, symlink=self.symlink) - - @property - def url_d(self): - return "http://{host}/d/{filehash}".format( - host=request.host, filehash=self.filehash) - - @property - def image_size(self): - if self.is_image: - im = Image.open(self.path) - return im.size - return (0, 0) - - @property - def quoteurl(self): - return urllib.quote(self.url_i) - - @classmethod - def create_by_img(cls, img, filename, mimetype): - rst = cls(filename, mimetype, 0) - img.save(rst.path) - filestat = os.stat(rst.path) - rst.size = filestat.st_size - return rst - - @classmethod - def rsize(cls, oldPaste, weight, height): - assert oldPaste.is_image - - img = cropresize2.crop_resize( - Image.open(oldPaste.path), (int(weight), int(height))) - - return cls.create_by_img(img, oldPaste.filename, oldPaste.mimetype) - - @classmethod - def affine(cls, oldPaste, w, h, a): - assert oldPaste.is_image - - img_size = (int(w), int(h)) - img = Image.open(oldPaste.path).transform( - img_size, Image.AFFINE, a, Image.BILINEAR) - - return cls.create_by_img(img, oldPaste.filename, oldPaste.mimetype) - - @property - def is_image(self): - return self.mimetype in IMAGE_MIMES - - @property - def is_audio(self): - return self.mimetype in AUDIO_MIMES - - @property - def is_video(self): - return self.mimetype in VIDEO_MIMES - - @property - def is_pdf(self): - return self.mimetype == "application/pdf" - - @property - def size_humanize(self): - if self.size < 1024: - return "{0} bytes".format(self.size) - size = self.size / 1024.0 - if size < 1024: - size = "%.2f" % size - return size.rstrip("0").rstrip(".") + " KB" - size = size / 1024.0 - size = "%.2f" % size - return size.rstrip("0").rstrip(".") + " MB" - - @property - def type(self): - may_types = ["image", "pdf", "video", "audio"] - for t in may_types: - if getattr(self, "is_" + t): - return t - return "binary" - - def simple_dict(self): - return { - "url_d": self.url_d, - "url_i": self.url_i, - "url_s": self.url_s, - "url_p": self.url_p, - "filename": self.filename, - "size": self.size_humanize, - "time": str(self.uploadTime), - "type": self.type, - "quoteurl": self.quoteurl, - } - - -def is_command_line_request(request): - agent = str(request.user_agent).lower() - if not agent: - return True - for k in command_agent_keys: - if k in agent: - return True - return False - - -@app.route('/r/') -def rsize(img_hash): - # TODO: rewrite - w = request.args['w'] - h = request.args['h'] - - oldPaste = PasteFile.get_by_filehash(img_hash) - - if not oldPaste: - return abort(404) - - newPaste = PasteFile.rsize(oldPaste, w, h) - - return newPaste.url_i - - -@app.route('/a/') -def affine(img_hash): - w = request.args['w'] - h = request.args['h'] - - a = request.args['a'] - a = map(float, a.split(',')) - - if len(a) != 6: - return abort(400) - - oldPaste = PasteFile.get_by_filehash(img_hash) - - if not oldPaste: - return abort(404) - - newPaste = PasteFile.affine(oldPaste, w, h, a) - - return newPaste.url_i - - -@app.route('/d/', methods=["GET"]) -def download(filehash): - pasteFile = PasteFile.get_by_filehash(filehash) - - if not pasteFile: - return abort(404) - - return send_file(open(pasteFile.path, "rb"), - mimetype="application/octet-stream", - cache_timeout=2592000, - as_attachment=True, - attachment_filename=pasteFile.filename.encode("UTF-8")) - - -@app.route('/', methods=['GET', 'POST']) -def hello(): - if request.method == 'POST': - uploadedFile = request.files['file'] - w = request.form.get('w') - h = request.form.get('h') - # text file treat as binary file. - # if user wanna post a text file, they would use pastebin / gist. - if not uploadedFile: - return abort(400) - - if w and h: - pasteFile = PasteFile.create_file_after_crop(uploadedFile, w, h) - else: - pasteFile = PasteFile.create_by_uploadFile(uploadedFile) - db.session.add(pasteFile) - db.session.commit() - - if is_command_line_request(request): - return pasteFile.url_i - - return jsonify(pasteFile.simple_dict()) - return render_template('index.html', **locals()) - - -@app.after_request -def after_request(response): - response.headers["Access-Control-Allow-Origin"] = "*" - response.headers["Access-Control-Allow-Headers"] = "Content-Type" - return response - - -@app.route('/j', methods=['POST']) -def j(): - uploadedFile = request.files['file'] - - if uploadedFile: - pasteFile = PasteFile.create_by_uploadFile(uploadedFile) - db.session.add(pasteFile) - db.session.commit() - width, height = pasteFile.image_size - - return jsonify({ - "url": pasteFile.url_i, - "short_url": pasteFile.url_s, - "origin_filename": pasteFile.filename, - "hash": pasteFile.filehash, - "width": width, - "height": height - }) - - return abort(400) - - -@app.route('/p/') -def preview(filehash): - pasteFile = PasteFile.get_by_filehash(filehash) - - filepath = os.path.join(app.config['UPLOAD_FOLDER'], filehash) - if not pasteFile: - # check file exists - if not(os.path.exists(filepath) and (not os.path.islink(filepath))): - return abort(404) - - linkfile = os.path.join( - app.config['UPLOAD_FOLDER'], filehash.replace('.', '_')) - symlink = None - if os.path.exists(linkfile): - with open(linkfile) as fp: - symlink = fp.read().strip() - - pasteFile = PasteFile.create_by_old_paste(filehash, symlink) - db.session.add(pasteFile) - db.session.commit() - - file_json = json.dumps(pasteFile.simple_dict()) - return render_template('success.html', title=pasteFile.filename, file_json=file_json) - - -@app.route('/s/') -def s(symlink): - pasteFile = PasteFile.get_by_symlink(symlink) - - if not pasteFile: - return abort(404) - - file_json = json.dumps(pasteFile.simple_dict()) - return render_template('success.html', title=pasteFile.filename, file_json=file_json) - - -if __name__ == "__main__": - app.run(host='0.0.0.0', debug=debug, port=5001, threaded=True) +# coding=utf-8 +import json +import os +from string import digits, ascii_uppercase, ascii_lowercase + +from flask import abort, Flask, request, jsonify, send_file + +from ext import db, mako, render_template +from models import PasteFile + +RANDOM_SEQ = ascii_uppercase + ascii_lowercase + digits +ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'mp3']) + + +app = Flask(__name__) +app.config.from_object("config") + +debug = app.config["DEBUG"] +if debug: + from werkzeug import SharedDataMiddleware + + app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { + '/i/': os.path.join( + os.path.dirname(__file__), app.config["UPLOAD_FOLDER"]) + }) + +mako.init_app(app) +db.init_app(app) + +command_agent_keys = ['curl', 'wget'] + + +def is_command_line_request(request): + agent = str(request.user_agent).lower() + if not agent: + return True + for k in command_agent_keys: + if k in agent: + return True + return False + + +@app.route('/r/') +def rsize(img_hash): + # TODO: rewrite + print(request.args) + w = request.args['w'] + h = request.args['h'] + + oldPaste = PasteFile.get_by_filehash(img_hash) + + if not oldPaste: + return abort(404) + + newPaste = PasteFile.rsize(oldPaste, w, h) + + return newPaste.url_i + + +@app.route('/a/') +def affine(img_hash): + w = request.args['w'] + h = request.args['h'] + + a = request.args['a'] + a = map(float, a.split(',')) + + if len(a) != 6: + return abort(400) + + oldPaste = PasteFile.get_by_filehash(img_hash) + + if not oldPaste: + return abort(404) + + newPaste = PasteFile.affine(oldPaste, w, h, a) + + return newPaste.url_i + + +@app.route('/d/', methods=["GET"]) +def download(filehash): + pasteFile = PasteFile.get_by_filehash(filehash) + + if not pasteFile: + return abort(404) + + return send_file(open(pasteFile.path, "rb"), + mimetype="application/octet-stream", + cache_timeout=2592000, + as_attachment=True, + attachment_filename=pasteFile.filename) + + +@app.route('/', methods=['GET', 'POST']) +def hello(): + if request.method == 'POST': + uploadedFile = request.files['file'] + if not allowed_file(uploadedFile.filename): + return abort(400) + w = request.form.get('w') + h = request.form.get('h') + # text file treat as binary file. + # if user wanna post a text file, they would use pastebin / gist. + if not uploadedFile: + return abort(400) + + if w and h: + pasteFile = PasteFile.create_file_after_crop(uploadedFile, w, h) + else: + pasteFile = PasteFile.create_by_uploadFile(uploadedFile) + db.session.add(pasteFile) + db.session.commit() + + if is_command_line_request(request): + return pasteFile.url_i + + return jsonify(pasteFile.simple_dict()) + return render_template('index.html', **locals()) + + +@app.after_request +def after_request(response): + response.headers["Access-Control-Allow-Origin"] = "*" + response.headers["Access-Control-Allow-Headers"] = "Content-Type" + return response + + +@app.route('/j', methods=['POST']) +def j(): + uploadedFile = request.files['file'] + if uploadedFile and allowed_file(uploadedFile.filename): + pasteFile = PasteFile.create_by_uploadFile(uploadedFile) + db.session.add(pasteFile) + db.session.commit() + width, height = pasteFile.image_size + + return jsonify({ + "url": pasteFile.url_i, + "short_url": pasteFile.url_s, + "origin_filename": pasteFile.filename, + "hash": pasteFile.filehash, + "width": width, + "height": height + }) + + return abort(400) + + +@app.route('/p/') +def preview(filehash): + pasteFile = PasteFile.get_by_filehash(filehash) + + filepath = os.path.join(app.config['UPLOAD_FOLDER'], filehash) + if not pasteFile: + # check file exists + if not (os.path.exists(filepath) and (not os.path.islink(filepath))): + return abort(404) + + # linkfile = os.path.join( + # app.config['UPLOAD_FOLDER'], filehash.replace('.', '_')) + # symlink = None + # if os.path.exists(linkfile): + # with open(linkfile) as fp: + # symlink = fp.read().strip() + + pasteFile = PasteFile.create_by_old_paste(filehash) + db.session.add(pasteFile) + db.session.commit() + + file_json = json.dumps(pasteFile.simple_dict()) + return render_template('success.html', title=pasteFile.filename, file_json=file_json) + + +@app.route('/s/') +def s(symlink): + pasteFile = PasteFile.get_by_symlink(symlink) + + if not pasteFile: + return abort(404) + + file_json = json.dumps(pasteFile.simple_dict()) + return render_template('success.html', title=pasteFile.filename, file_json=file_json) + + +def allowed_file(filename): + return '.' in filename and \ + filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS + + +if __name__ == "__main__": + app.run(host='0.0.0.0', debug=debug) diff --git a/config.py b/config.py index 38dbe69..8d81dbc 100755 --- a/config.py +++ b/config.py @@ -7,8 +7,8 @@ UPLOAD_FOLDER = permdir.get_permdir() except ImportError: _SQL_PARAMS = { - 'passwd': 'admin', - 'host': 'db', + 'passwd': 'root', + 'host': '127.0.0.1', 'db': 'p', 'port': 3306, 'user': 'root', diff --git a/databases/schema.sql b/databases/schema.sql index aaef136..f7d5f60 100644 --- a/databases/schema.sql +++ b/databases/schema.sql @@ -1,15 +1,14 @@ -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; CREATE TABLE `PasteFile` ( `id` int(11) NOT NULL AUTO_INCREMENT, `filename` varchar(5000) NOT NULL, `filehash` varchar(128) NOT NULL, + `filemd5` varchar(128) NOT NULL, `uploadTime` datetime NOT NULL, `mimetype` varchar(256) NOT NULL, - `symlink` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `symlink` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin, `size` int(11) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `filehash` (`filehash`), UNIQUE KEY `symlink` (`symlink`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; + diff --git a/ext.py b/ext.py new file mode 100755 index 0000000..516fbed --- /dev/null +++ b/ext.py @@ -0,0 +1,6 @@ +# coding=utf-8 +from flask_mako import MakoTemplates, render_template +from flask_sqlalchemy import SQLAlchemy + +mako = MakoTemplates() +db = SQLAlchemy() diff --git a/models.py b/models.py new file mode 100755 index 0000000..1f63a04 --- /dev/null +++ b/models.py @@ -0,0 +1,250 @@ +# coding=utf-8 +import os +try: + from urllib import quote +except ImportError: + from urllib.parse import quote +import uuid +from datetime import datetime +import hashlib + +import cropresize2 +import magic +import short_url +from PIL import Image +from flask import abort, request +from werkzeug.utils import cached_property + +from ext import db +from mimes import IMAGE_MIMES, AUDIO_MIMES, VIDEO_MIMES +from config import UPLOAD_FOLDER + + +class PasteFile(db.Model): + __tablename__ = "PasteFile" + id = db.Column(db.Integer, primary_key=True) + filename = db.Column(db.String(5000), nullable=False) + filehash = db.Column(db.String(128), nullable=False, unique=True) + uploadTime = db.Column(db.DateTime, nullable=False) + mimetype = db.Column(db.String(256), nullable=False) + filemd5 = db.Column(db.String(128), nullable=False, unique=True) + + # collation is for case-sensitive select + # symlink = db.Column( + # db.String(50, collation='utf8_bin'), nullable=False, unique=True) + size = db.Column(db.Integer, nullable=False) + + def __init__(self, filename="", mimetype="application/octet-stream", + size=0, filehash=None, symlink=None, filemd5=None): + self.uploadTime = datetime.now() + self.mimetype = mimetype + self.size = int(size) + self.filehash = filehash if filehash else self._hash_filename(filename) + self.filename = filename if filename else self.filehash + # self.symlink = symlink if symlink else self._gen_symlink() + self.filemd5 = filemd5 + + @staticmethod + def _hash_filename(filename): + _, _, suffix = filename.rpartition('.') + return "%s.%s" % (uuid.uuid4().hex, suffix) + + # @staticmethod + # def _gen_symlink(): + # return "".join(choice(RANDOM_SEQ) for x in range(6)) + @cached_property + def symlink(self): + return short_url.encode_url(self.id) + + @classmethod + def get_by_filehash(cls, filehash): + return cls.query.filter_by(filehash=filehash).first() + + @classmethod + def get_by_symlink(cls, symlink, code=404): + id = short_url.decode_url(symlink) + return cls.query.filter_by(id=id).first() or abort(code) + # return cls.query.filter_by(symlink=symlink).first() + + @classmethod + def get_by_md5(cls, filemd5): + return cls.query.filter_by(filemd5=filemd5).first() + + @classmethod + def create_by_uploadFile(cls, uploadedFile): + rst = cls(uploadedFile.filename, + uploadedFile.mimetype, 0) + uploadedFile.save(rst.path) + duplicated = False + corrupt = False + filepath = None + + with open(rst.path, 'rb') as f: + filemd5 = get_file_md5(f) + uploadedFile = cls.get_by_md5(filemd5) + + if uploadedFile: + filepath = os.path.join(UPLOAD_FOLDER, uploadedFile.filehash) + if os.path.exists(filepath) or os.path.islink(filepath): + duplicated = True + else: + corrupt = True + + if duplicated: + os.remove(rst.path) + return uploadedFile + + if corrupt: + uploadedFile.filehash = rst.filehash + return uploadedFile + + filestat = os.stat(rst.path) + rst.size = filestat.st_size + rst.filemd5 = filemd5 + return rst + + @classmethod + def create_file_after_crop(cls, uploadedFile, width, height): + assert uploadedFile.is_image, TypeError("Unsupported Image Type.") + + img = cropresize2.crop_resize( + Image.open(uploadedFile), (int(width), int(height))) + rst = cls(uploadedFile.filename, + uploadedFile.mimetype, 0) + img.save(rst.path) + + filestat = os.stat(rst.path) + rst.size = filestat.st_size + + return rst + + @classmethod + def create_by_old_paste(cls, filehash, symlink): + filepath = os.path.join(UPLOAD_FOLDER, filehash) + mimetype = magic.from_file(filepath, mime=True) + filestat = os.stat(filepath) + size = filestat.st_size + + rst = cls(filehash, mimetype, size, filehash=filehash, symlink=symlink) + return rst + + @property + def path(self): + return os.path.join(UPLOAD_FOLDER, self.filehash) + + @property + def url_i(self): + return "http://{host}/i/{filehash}".format( + host=request.host, filehash=self.filehash) + + @property + def url_p(self): + return "http://{host}/p/{filehash}".format( + host=request.host, filehash=self.filehash) + + @property + def url_s(self): + return "http://{host}/s/{symlink}".format( + host=request.host, symlink=self.symlink) + + @property + def url_d(self): + return "http://{host}/d/{filehash}".format( + host=request.host, filehash=self.filehash) + + @property + def image_size(self): + if self.is_image: + im = Image.open(self.path) + return im.size + return (0, 0) + + @property + def quoteurl(self): + return quote(self.url_i) + + @classmethod + def create_by_img(cls, img, filename, mimetype): + rst = cls(filename, mimetype, 0) + img.save(rst.path) + filestat = os.stat(rst.path) + rst.size = filestat.st_size + return rst + + @classmethod + def rsize(cls, oldPaste, weight, height): + assert oldPaste.is_image + + img = cropresize2.crop_resize( + Image.open(oldPaste.path), (int(weight), int(height))) + + return cls.create_by_img(img, oldPaste.filename, oldPaste.mimetype) + + @classmethod + def affine(cls, oldPaste, w, h, a): + assert oldPaste.is_image + + img_size = (int(w), int(h)) + img = Image.open(oldPaste.path).transform( + img_size, Image.AFFINE, a, Image.BILINEAR) + + return cls.create_by_img(img, oldPaste.filename, oldPaste.mimetype) + + @property + def is_image(self): + return self.mimetype in IMAGE_MIMES + + @property + def is_audio(self): + return self.mimetype in AUDIO_MIMES + + @property + def is_video(self): + return self.mimetype in VIDEO_MIMES + + @property + def is_pdf(self): + return self.mimetype == "application/pdf" + + @property + def size_humanize(self): + if self.size < 1024: + return "{0} bytes".format(self.size) + size = self.size / 1024.0 + if size < 1024: + size = "%.2f" % size + return size.rstrip("0").rstrip(".") + " KB" + size = size / 1024.0 + size = "%.2f" % size + return size.rstrip("0").rstrip(".") + " MB" + + @property + def type(self): + may_types = ["image", "pdf", "video", "audio"] + for t in may_types: + if getattr(self, "is_" + t): + return t + return "binary" + + def simple_dict(self): + return { + "url_d": self.url_d, + "url_i": self.url_i, + "url_s": self.url_s, + "url_p": self.url_p, + "filename": self.filename, + "size": self.size_humanize, + "time": str(self.uploadTime), + "type": self.type, + "quoteurl": self.quoteurl, + } + + +def get_file_md5(f, chunk_size=8192): + h = hashlib.md5() + while True: + chunk = f.read(chunk_size) + if not chunk: + break + h.update(chunk) + return h.hexdigest() diff --git a/package.json b/package.json old mode 100644 new mode 100755 index d820b42..1bc38db --- a/package.json +++ b/package.json @@ -1,34 +1,42 @@ -{ - "name": "r", - "version": "0.0.1", - "description": "r is a upload photo service", - "main": "index.js", - "scripts": { - "build": "webpack --progress --colors", - "watch": "webpack --watch --colors", - "start": "webpack && python app.py", - "prod": "webpack --optimize-minimize --define process.env.NODE_ENV=\"'production'\"", - "server": "python app.py" - }, - "repository": { - "type": "git", - "url": "http://code.dapps.douban.com/r.git" - }, - "author": "Dongweiming", - "license": "ISC", - "devDependencies": { - "babel-core": "^5.8.22", - "babel-loader": "^5.3.2", - "babelify": "^6.2.0", - "css-loader": "^0.16.0", - "extract-text-webpack-plugin": "^0.8.2", - "file-loader": "^0.8.4", - "node-sass": "^3.13.1", - "sass-loader": "^2.0.1", - "webpack": "^1.11.0" - }, - "dependencies": { - "classnames": "^2.2.5", - "react": "^0.13.3" - } -} +{ + "name": "r", + "version": "0.0.1", + "description": "r is a upload photo service", + "main": "index.js", + "scripts": { + "build": "webpack --progress --colors --mode production", + "watch": "webpack --watch --colors", + "start": "webpack && python app.py", + "prod": "webpack --optimize-minimize --define process.env.NODE_ENV=\"'production'\"", + "server": "python app.py" + }, + "repository": { + "type": "git", + "url": "http://code.dapps.douban.com/r.git" + }, + "author": "Dongweiming", + "license": "ISC", + "devDependencies": { + "@babel/plugin-proposal-class-properties": "^7.2.3", + "babel-core": "^6.26.3", + "babel-loader": "^8.0.5", + "babelify": "^10.0.0", + "css-loader": "^2.1.0", + "extract-text-webpack-plugin": "^4.0.0-beta.0", + "file-loader": "^3.0.1", + "mini-css-extract-plugin": "^0.5.0", + "node-sass": "^4.11.0", + "sass-loader": "^7.1.0", + "uglifyjs-webpack-plugin": "^2.1.1", + "webpack": "^4.28.3", + "webpack-cli": "^3.2.0" + }, + "dependencies": { + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "classnames": "^2.2.6", + "react": "^16.7.0", + "react-dom": "^16.7.0" + } +} diff --git a/pip-req.txt b/pip-req.txt deleted file mode 100644 index 0bc3eba..0000000 --- a/pip-req.txt +++ /dev/null @@ -1,14 +0,0 @@ -Flask==0.10.1 -Flask-Mako==0.3 -Flask-SQLAlchemy==2.0 -Jinja2==2.8 -Mako==1.0.1 -python-magic==0.4.3 -MarkupSafe==0.23 -Pillow==2.9.0 -Werkzeug==0.10.4 -MySQL-python==1.2.5 -SQLAlchemy==1.0.8 --e git+https://github.com/frol/python-cropresize2#egg=cropresize -itsdangerous==0.24 -pytz==2015.4 diff --git a/requirements.txt b/requirements.txt index 901d6bf..e8a2d9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,16 @@ -Flask==0.10.1 -Flask-Mako==0.3 -Flask-SQLAlchemy==2.0 -Jinja2==2.8 -python-magic==0.4.3 -Mako==1.0.1 -MarkupSafe==0.23 -Pillow==2.9.0 -MySQL-python==1.2.5 -SQLAlchemy==1.1.15 -Werkzeug==0.10.4 --e git+https://github.com/frol/python-cropresize2#egg=cropresize2 -itsdangerous==0.24 -pytz==2015.4 +Click==7.0 +-e git+https://github.com/frol/python-cropresize2@73b082fc13950800800f157b134c2493969b6521#egg=cropresize2 +Flask==1.0.2 +Flask-Mako==0.4 +Flask-SQLAlchemy==2.3.2 +itsdangerous==1.1.0 +Jinja2==2.10 +Mako==1.0.7 +MarkupSafe==1.1.0 +mysqlclient==1.3.14 +Pillow==5.4.0 +python-magic==0.4.15 +pytz==2018.7 +short-url==1.2.2 +SQLAlchemy==1.2.15 +Werkzeug==0.14.1 diff --git a/static/dist/index.css b/static/dist/index.css index f833826..0c7d383 100644 --- a/static/dist/index.css +++ b/static/dist/index.css @@ -1,2 +1,397 @@ -body{background-color:#63b6ae;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:center;margin:0;padding:0}input{-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased}a{text-decoration:none}#holder{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:999;opacity:0;width:100%;height:100%}.arrow{position:fixed;left:50%;top:45%;margin-top:-135px;margin-left:-200px;width:25pc;height:270px;background-image:url(/static/img/arrow.svg);background-size:25pc;background-repeat:no-repeat;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;box-sizing:border-box;padding:8px}.arrow.hover{width:450px;height:19pc;margin-top:-152px;margin-left:-225px;background-size:450px}.arrow.hover .alpha-bg{background-color:hsla(0,0%,100%,0)}.arrow.hover .notice{height:3in;line-height:3in}.arrow.hide{-webkit-animation:hide-arrow .5s ease-out 1 forwards;-moz-animation:hide-arrow .5s ease-out 1 forwards}.alpha-bg{background-color:hsla(0,0%,100%,.15);height:100%;position:relative;-webkit-transition:background-color .2s linear;-moz-transition:background-color .2s linear}.alpha-bg,.notice{display:block;width:100%}.notice{position:absolute;left:0;top:0;color:#fff;height:254px;line-height:254px;font-family:PT Sans Caption,sans-serif;font-size:30px;font-weight:700;opacity:0;text-shadow:1px 2px 1px rgba(30,30,30,.2)}.notice.show{opacity:1}#drag-notice{-webkit-transition:opacity,height,line-height .1s ease-out;-moz-transition:opacity,height,line-height .1s ease-out}#drop-notice{-webkit-transition:opacity,height,line-height .3s ease-in;-moz-transition:opacity,height,line-height .3s ease-in}#multi-notice{-webkit-transition:opacity .3s linear;-moz-transition:opacity .3s linear}#progress{opacity:0;transition:opacity .3s linear;position:fixed;top:40%;left:50%;margin-left:-5pc;display:none}#progress.show{opacity:1;display:block}@-webkit-keyframes animate-stripes{0%{background-position:0 0}to{background-position:-60px 0}}progress{background:#e9ebef;border-radius:10px}progress::-moz-progress-bar{border-radius:9px;background-color:#5e544b;background-size:30px 30px;background-image:linear-gradient(135deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);animation:animate-stripes 3s linear infinite}progress::-webkit-progress-bar{background:#e9ebef;border-radius:10px}progress::-webkit-progress-value{border-radius:9px;background-color:#5e544b;background-size:30px 30px;background-image:linear-gradient(135deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);-webkit-animation:animate-stripes 3s linear infinite;-moz-animation:animate-stripes 3s linear infinite}@-webkit-keyframes hide-arrow{0%{width:450px;height:19pc;margin-top:-152px;margin-left:-225px;background-size:450px;opacity:1}20%{width:5in;height:330px;margin-top:-165px;margin-left:-15pc;background-size:5in;opacity:.9}to{width:75pt;height:70px;margin-top:-35px;margin-left:-50px;background-size:75pt;opacity:0}}@-webkit-keyframes card-in{0%{opacity:0;-webkit-transform:perspective(600px) scale(0) rotateY(180deg)}to{opacity:1;-webkit-transform:perspective(600px) scale(1) rotateY(0deg)}}#card{opacity:0;min-width:290px;max-width:290px;position:fixed;left:50%;top:40%;margin-top:-115px;margin-left:-145px;display:none}#card .p-link{width:100%;margin-top:10px}#card .p-link input{width:100%;padding:0;margin:0;border:none;background:transparent;text-align:center;color:#888;font-size:13px}#card.visible{display:block;opacity:1}#card.show-card,#image-card.show-card{-webkit-animation:card-in .7s ease-in 1 forwards;-moz-animation:card-in .7s ease-in 1 forwards;opacity:1;display:block}#image-card{margin-top:75pt;display:none;box-sizing:border-box}#image-card.visible{display:block;opacity:1}#image-card.zoomed{margin:0}#card-info{width:100%;position:relative;z-index:50;border:1px solid #dcdcdc;padding-bottom:20px;border-radius:3px;background-color:#cdcdcd;background-image:linear-gradient(bottom,#f2f2f2 17%,#fafafa 90%);background-image:-ms-linear-gradient(bottom,#f2f2f2 17%,#fafafa 90%);background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.17, #f2f2f2),color-stop(0.9, #fafafa))}.file-icon{margin-top:30px}.file-icon img{width:75px}.file-meta span{font-family:PT Sans,sans-serif;font-size:13px;color:#888}.file-meta span.sep{padding:0 5px}.file-meta .filename{font-weight:400;color:#666;font-size:18px;font-family:PT Sans,sans-serif;text-shadow:0 1px 0 hsla(0,0%,100%,.8);padding:0 20px;word-break:break-all}#action-area{margin-top:20px}#action-area a{font-family:PT Sans,sans-serif;display:inline-block;width:37%;color:#fff;padding:7px 0;margin:0 10px;font-size:14px;text-shadow:0 1px 0 rgba(0,0,0,.3);border-radius:3px}#action-area a:hover{text-decoration:none}#action-area #download-link{background-color:#298cf1;background-image:linear-gradient(bottom,#1f6ab4 11%,#298df1 11%);background-image:-ms-linear-gradient(bottom,#1f6ab4 11%,#298df1 11%);background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.11, #1f6ab4),color-stop(0.11, #298df1))}#action-area #play-link{background-image:linear-gradient(bottom,#9c4a3f 11%,#e15b49 11%);background-image:-ms-linear-gradient(bottom,#9c4a3f 11%,#e15b49 11%);background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0.11, #9c4a3f),color-stop(0.11, #e15b49))}.invisible{display:none}#image-preview{display:inline-block;max-height:70%;max-width:70%;padding:4px;background-color:#f6f6f6;border:1px solid #dcdcdc;border-radius:3px;box-sizing:border-box;cursor:zoom-in;cursor:-webkit-zoom-in;position:relative;z-index:45}#image-preview img{max-height:70%;max-width:100%;display:block}#image-preview.zoomed{display:inline-block;cursor:zoom-out;cursor:-webkit-zoom-out;position:static;overflow:auto;padding:4px 0}#image-preview.zoomed,#image-preview.zoomed img{max-width:none;max-height:none}#image-preview.zoomed #image-link{display:none}#image-link input{width:100%;border:none;outline:0;background:transparent;text-align:center;margin:5px 0;color:#888}.qrcode{margin-top:20px} +body { + background-color: #63b6ae; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + text-align: center; + margin: 0; + padding: 0; } + +input { + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; } + +a { + text-decoration: none; } + +#holder { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 999; + opacity: 0; + width: 100%; + height: 100%; } + +.arrow { + position: fixed; + left: 50%; + top: 45%; + margin-top: -135px; + margin-left: -200px; + width: 400px; + height: 270px; + background-image: url(/static/img/arrow.svg); + background-size: 400px; + background-repeat: no-repeat; + -webkit-transition: all .2s ease-out; + -moz-transition: all .2s ease-out; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 8px; } + .arrow.hover { + width: 450px; + height: 304px; + margin-top: -152px; + margin-left: -225px; + background-size: 450px; } + .arrow.hover .alpha-bg { + background-color: rgba(255, 255, 255, 0); } + .arrow.hover .notice { + height: 288px; + line-height: 288px; } + .arrow.hide { + -webkit-animation: hide-arrow .5s ease-out 1 forwards; + -moz-animation: hide-arrow .5s ease-out 1 forwards; } + +.alpha-bg { + display: block; + background-color: rgba(255, 255, 255, 0.15); + height: 100%; + width: 100%; + position: relative; + -webkit-transition: background-color .2s linear; + -moz-transition: background-color .2s linear; } + +.notice { + position: absolute; + left: 0; + top: 0; + width: 100%; + display: block; + color: white; + height: 254px; + line-height: 254px; + font-family: PT Sans Caption, sans-serif; + font-size: 30px; + font-weight: bold; + opacity: 0; + text-shadow: 1px 2px 1px rgba(30, 30, 30, 0.2); } + .notice.show { + opacity: 1; } + +#drag-notice { + -webkit-transition: opacity, height, line-height .1s ease-out; + -moz-transition: opacity, height, line-height .1s ease-out; } + +#drop-notice { + -webkit-transition: opacity, height, line-height .3s ease-in; + -moz-transition: opacity, height, line-height .3s ease-in; } + +#multi-notice { + -webkit-transition: opacity .3s linear; + -moz-transition: opacity .3s linear; } + +#progress { + opacity: 0; + -webkit-transition: opacity .3s linear; + -moz-transition: opacity .3s linear; + transition: opacity .3s linear; + position: fixed; + top: 40%; + left: 50%; + margin-left: -80px; + display: none; } + #progress.show { + opacity: 1; + display: block; } + +@-webkit-keyframes animate-stripes { + 0% { + background-position: 0 0; } + 100% { + background-position: -60px 0; } } + +@-moz-keyframes animate-stripes { + 0% { + background-position: 0 0; } + 100% { + background-position: -60px 0; } } + +progress { + background: #e9ebef; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; } + +progress::-moz-progress-bar { + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; + background-color: #5e544b; + background-size: 30px 30px; + background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -moz-animation: animate-stripes 3s linear infinite; + animation: animate-stripes 3s linear infinite; } + +progress::-webkit-progress-bar { + background: #e9ebef; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; } + +progress::-webkit-progress-value { + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; + background-color: #5e544b; + -webkit-background-size: 30px 30px; + -moz-background-size: 30px 30px; + background-size: 30px 30px; + background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-animation: animate-stripes 3s linear infinite; + -moz-animation: animate-stripes 3s linear infinite; } + +@-webkit-keyframes hide-arrow { + 0% { + width: 450px; + height: 304px; + margin-top: -152px; + margin-left: -225px; + background-size: 450px; + opacity: 1; } + 20% { + width: 480px; + height: 330px; + margin-top: -165px; + margin-left: -240px; + background-size: 480px; + opacity: .9; } + 100% { + width: 100px; + height: 70px; + margin-top: -35px; + margin-left: -50px; + background-size: 100px; + opacity: 0; } } + +@-moz-keyframes hide-arrow { + 0% { + width: 450px; + height: 304px; + margin-top: -152px; + margin-left: -225px; + background-size: 450px; + opacity: 1; } + 20% { + width: 480px; + height: 330px; + margin-top: -165px; + margin-left: -240px; + background-size: 480px; + opacity: .9; } + 100% { + width: 100px; + height: 70px; + margin-top: -35px; + margin-left: -50px; + background-size: 100px; + opacity: 0; + display: none; } } + +@-webkit-keyframes card-in { + 0% { + opacity: 0; + -webkit-transform: perspective(600px) scale(0) rotateY(180deg); } + 100% { + opacity: 1; + -webkit-transform: perspective(600px) scale(1) rotateY(0deg); } } + +@-moz-keyframes card-in { + 0% { + opacity: 0; + -webkit-transform: perspective(600px) scale(0) rotateY(180deg); } + 100% { + opacity: 1; + -webkit-transform: perspective(600px) scale(1) rotateY(0deg); } } + +#card { + opacity: 0; + min-width: 290px; + max-width: 290px; + position: fixed; + left: 50%; + top: 40%; + margin-top: -115px; + margin-left: -145px; + display: none; } + #card .p-link { + width: 100%; + margin-top: 10px; } + #card .p-link input { + width: 100%; + padding: 0; + margin: 0; + border: none; + background: transparent; + text-align: center; + color: #888; + font-size: 13px; } + #card.visible { + display: block; + opacity: 1; } + +#card.show-card, #image-card.show-card { + -webkit-animation: card-in .7s ease-in 1 forwards; + -moz-animation: card-in .7s ease-in 1 forwards; + opacity: 1; + display: block; } + +#image-card { + margin-top: 100px; + display: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + #image-card.visible { + display: block; + opacity: 1; } + #image-card.zoomed { + margin: 0; } + +#card-info { + width: 100%; + position: relative; + z-index: 50; + background-color: #cdcdcd; + border: 1px solid #dcdcdc; + padding-bottom: 20px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #cdcdcd; + background-image: linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%); + background-image: -o-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%); + background-image: -moz-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%); + background-image: -webkit-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%); + background-image: -ms-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.17, #f2f2f2), color-stop(0.9, #fafafa)); } + +.file-icon { + margin-top: 30px; } + .file-icon img { + width: 75px; } + +.file-meta span { + font-family: PT Sans, sans-serif; + font-size: 13px; + color: #888; } + .file-meta span.sep { + padding: 0 5px; } + +.file-meta .filename { + font-weight: normal; + color: #666; + font-size: 18px; + font-family: PT Sans, sans-serif; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); + padding: 0 20px; + word-break: break-all; } + +#action-area { + margin-top: 20px; } + #action-area a { + font-family: PT Sans, sans-serif; + display: inline-block; + width: 37%; + color: white; + padding: 7px 0; + margin: 0 10px; + font-size: 14px; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } + #action-area a:hover { + text-decoration: none; } + #action-area #download-link { + background-color: #298cf1; + background-image: linear-gradient(bottom, #1f6ab4 11%, #298df1 11%); + background-image: -o-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%); + background-image: -moz-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%); + background-image: -webkit-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%); + background-image: -ms-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.11, #1f6ab4), color-stop(0.11, #298df1)); } + #action-area #play-link { + background-image: linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%); + background-image: -o-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%); + background-image: -moz-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%); + background-image: -webkit-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%); + background-image: -ms-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.11, #9c4a3f), color-stop(0.11, #e15b49)); } + +.invisible { + display: none; } + +#image-preview { + display: inline-block; + max-height: 70%; + max-width: 70%; + padding: 4px; + background-color: #f6f6f6; + border: 1px solid #dcdcdc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: zoom-in; + cursor: -moz-zoom-in; + cursor: -webkit-zoom-in; + position: relative; + z-index: 45; } + #image-preview img { + max-height: 70%; + max-width: 100%; + display: block; } + #image-preview.zoomed { + display: inline-block; + max-width: none; + max-height: none; + cursor: zoom-out; + cursor: -moz-zoom-out; + cursor: -webkit-zoom-out; + position: static; + overflow: auto; + padding: 4px 0; } + #image-preview.zoomed img { + max-height: none; + max-width: none; } + #image-preview.zoomed #image-link { + display: none; } + +#image-link input { + width: 100%; + border: none; + outline: none; + background: transparent; + text-align: center; + margin: 5px 0; + color: #888; } + +.qrcode { + margin-top: 20px; } + + /*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/static/dist/index.css.map b/static/dist/index.css.map index b6866e7..ed49ed7 100644 --- a/static/dist/index.css.map +++ b/static/dist/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./static/stylesheets/main.scss"],"names":[],"mappings":"AA+BA,KACI,yBACA,yBACA,sBACA,iBACA,kBACA,SACA,SAAW,CACd,MAEG,mCACA,+BAAiC,CACpC,EAEG,oBAAsB,CACzB,QAEG,cACA,kBACA,MACA,OACA,QACA,SACA,YACA,UACA,WACA,WAAa,CAChB,OAEG,eACA,SACA,QACA,kBACA,mBACA,WACA,aACA,4CACA,qBACA,4BACA,oCACA,iCAGA,sBACA,WAAa,CAhBjB,aAkBQ,YACA,YACA,kBACA,mBACA,qBAAuB,CAtB/B,uBAwBY,kCAhFE,CAwDd,qBA2BY,WACA,eAAmB,CA5B/B,YAgCQ,qDACA,iDAAmD,CACtD,UAID,qCACA,YAEA,kBACA,+CACA,2CAA6C,CAChD,kBAPG,cAGA,UACA,CAIJ,QACI,kBACA,OACA,MAGA,WACA,aACA,kBACA,uCACA,eACA,gBACA,UAEA,yCAjHgC,CAmGpC,aAgBQ,SAAW,CACd,aAID,2DACA,uDAA2D,CAC9D,aAGG,0DACA,sDAA0D,CAE7D,cAGG,sCACA,kCAAoC,CACvC,UAGG,UAGA,8BACA,eACA,QACA,SACA,iBACA,YAAc,CATlB,eAWQ,UACA,aAAe,CAClB,mCAGD,GACI,uBAAyB,CAE7B,GACI,2BAA6B,EAWrC,SACI,mBAGA,kBAAoB,CACvB,4BAIG,kBACA,yBACA,0BAIA,6KAIA,4CAA8C,CACjD,+BAEG,mBAGA,kBAAoB,CACvB,iCAIG,kBACA,yBAGA,0BAkBA,6KAGA,qDACA,iDAAmD,CACtD,8BAEG,GACI,YACA,YACA,kBACA,mBACA,sBACA,SAAW,CAEf,IACI,UACA,aACA,kBACA,kBACA,oBACA,UAAY,CAEhB,GACI,WACA,YACA,iBACA,kBACA,qBACA,SAAW,EA8BnB,2BACI,GACI,UACA,6DAAwD,CAE5D,GACI,UACA,2DAAsD,EAa9D,MACI,UACA,gBACA,gBACA,eACA,SACA,QACA,kBACA,mBACA,YAAc,CATlB,cAWQ,WACA,eAAiB,CAZzB,oBAcY,WACA,UACA,SACA,YACA,uBACA,kBACA,WACA,cAAgB,CArB5B,cAyBQ,cACA,SAAW,CACd,sCAID,iDACA,8CACA,UACA,aAAe,CAClB,YAGG,gBACA,aAGA,qBAAuB,CAL3B,oBAOQ,cACA,SAAW,CARnB,mBAWQ,QAAU,CACb,WAGD,WACA,kBACA,WAEA,yBACA,oBAGA,kBACA,yBACA,iEAIA,qEACA,iHAAkC,CAOrC,WAEG,eAAiB,CADrB,eAGQ,UAAY,CACX,gBAID,+BACA,eACA,UAtXqB,CAkX7B,oBAMY,aAAe,CAN3B,qBAUQ,gBACA,WACA,eACA,+BAEA,uCACA,eAEA,oBAAsB,CACzB,aAGD,eAAiB,CADrB,eAGQ,+BACA,qBACA,UACA,WACA,cACA,cACA,eAEA,mCAGA,iBAAmB,CAd3B,qBAgBY,oBAAsB,CAhBlC,4BAoBQ,yBACA,iEAIA,qEACA,kHAAkC,CA1B1C,wBAmCQ,iEAIJ,qEACA,kHAAkC,CAQjC,WAGD,YAAc,CACjB,eAGG,qBACA,eACA,cACA,YACA,yBACA,yBAIA,kBAGA,sBACA,eAEA,uBACA,kBACA,UAAY,CAlBhB,mBAoBQ,eACA,eACA,aAAe,CAtBvB,sBAyBQ,qBAGA,gBAEA,wBACA,gBACA,cACA,aAAe,CAjCvB,gDA0BQ,eACA,eACA,CA5BR,kCAuCY,YAAc,CACjB,kBAIL,WACA,YACA,UACA,uBACA,kBACA,aACA,UA/eyB,CAgf5B,QAGG,eAAiB","file":"index.css","sourcesContent":["//colors\n$color_tradewind_approx: #63b6ae;\n$white_15: rgba(255, 255, 255, .15);\n$white_0: rgba(255, 255, 255, .0);\n$white: white;\n$color_rangoon_green_20_approx: rgba(30, 30, 30, .2);\n$color_gallery_approx: #e9ebef;\n$color_don_juan_approx: #5e544b;\n$color_celeste_approx: #cdcdcd;\n$concrete: rgb(242,242,242);\n$alabaster: rgb(250,250,250);\n$color_dove_gray_50_approx: rgba(105, 105, 105, .5);\n$color_alto_approx: #dcdcdc;\n$color_suva_gray_approx: #888;\n$color_storm_dust_approx: #666;\n$white_80: rgba(255, 255, 255, .8);\n$black_30: rgba(0, 0, 0, .3);\n$color_dodger_blue_approx: #298cf1;\n$color_denim_approx: rgb(31,106,180);\n$color_copper_rust_approx: rgb(156,74,63);\n$color_flame_pea_approx: rgb(225,91,73);\n$color_black_haze_approx: #f6f6f6;\n\n//fonts\n$font_0: PT Sans Caption;\n$font_1: sans-serif;\n$font_2: PT Sans;\n\n//urls\n$url_0: url(/static/img/arrow.svg);\n\nbody {\n background-color: $color_tradewind_approx;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: center;\n margin: 0;\n padding: 0;\n}\ninput {\n -webkit-font-smoothing: antialiased;\n -moz-font-smoothing: antialiased;\n}\na {\n text-decoration: none;\n}\n#holder {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n opacity: 0;\n width: 100%;\n height: 100%;\n}\n.arrow {\n position: fixed;\n left: 50%;\n top: 45%;\n margin-top: -135px;\n margin-left: -200px;\n width: 400px;\n height: 270px;\n background-image: $url_0;\n background-size: 400px;\n background-repeat: no-repeat;\n -webkit-transition: all .2s ease-out;\n -moz-transition: all .2s ease-out;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 8px;\n &.hover {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px;\n .alpha-bg {\n background-color: $white_0;\n }\n .notice {\n height: 288px;\n line-height: 288px;\n }\n }\n &.hide {\n -webkit-animation: hide-arrow .5s ease-out 1 forwards;\n -moz-animation: hide-arrow .5s ease-out 1 forwards;\n }\n}\n.alpha-bg {\n display: block;\n background-color: $white_15;\n height: 100%;\n width: 100%;\n position: relative;\n -webkit-transition: background-color .2s linear;\n -moz-transition: background-color .2s linear;\n}\n.notice {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n display: block;\n color: $white;\n height: 254px;\n line-height: 254px;\n font-family: $font_0, $font_1;\n font-size: 30px;\n font-weight: bold;\n opacity: 0;\n //Instead of the line below you could use @include text-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)\n text-shadow: 1px 2px 1px $color_rangoon_green_20_approx;\n &.show {\n opacity: 1;\n }\n}\n\n#drag-notice {\n -webkit-transition: opacity, height, line-height .1s ease-out;\n -moz-transition: opacity, height, line-height .1s ease-out;\n}\n\n#drop-notice {\n -webkit-transition: opacity, height, line-height .3s ease-in;\n -moz-transition: opacity, height, line-height .3s ease-in;\n\n}\n\n#multi-notice {\n -webkit-transition: opacity .3s linear;\n -moz-transition: opacity .3s linear;\n}\n\n#progress {\n opacity: 0;\n -webkit-transition: opacity .3s linear;\n -moz-transition: opacity .3s linear;\n transition: opacity .3s linear;\n position: fixed;\n top: 40%;\n left: 50%;\n margin-left: -80px;\n display: none;\n &.show {\n opacity: 1;\n display: block;\n }\n}\n@-webkit-keyframes animate-stripes {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: -60px 0;\n }\n}\n@-moz-keyframes animate-stripes {\n 0% {\n background-position: 0 0;\n }\n 100% {\n background-position: -60px 0;\n }\n}\nprogress {\n background: $color_gallery_approx;\n -webkit-border-radius: 10px;\n -moz-border-radius: 10px;\n border-radius: 10px;\n}\nprogress::-moz-progress-bar {\n -webkit-border-radius: 9px;\n -moz-border-radius: 9px;\n border-radius: 9px;\n background-color: $color_don_juan_approx;\n background-size: 30px 30px;\n background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n -moz-animation: animate-stripes 3s linear infinite;\n animation: animate-stripes 3s linear infinite;\n}\nprogress::-webkit-progress-bar {\n background: $color_gallery_approx;\n -webkit-border-radius: 10px;\n -moz-border-radius: 10px;\n border-radius: 10px;\n}\nprogress::-webkit-progress-value {\n -webkit-border-radius: 9px;\n -moz-border-radius: 9px;\n border-radius: 9px;\n background-color: $color_don_juan_approx;\n -webkit-background-size: 30px 30px;\n -moz-background-size: 30px 30px;\n background-size: 30px 30px;\n background-image: -webkit-gradient(linear, left top, right bottom,\n color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent),\n color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)),\n color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent),\n to(transparent));\n background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n -webkit-animation: animate-stripes 3s linear infinite;\n -moz-animation: animate-stripes 3s linear infinite;\n}\n@-webkit-keyframes hide-arrow {\n 0% {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px;\n opacity: 1;\n }\n 20% {\n width: 480px;\n height: 330px;\n margin-top: -165px;\n margin-left: -240px;\n background-size: 480px;\n opacity: .9;\n }\n 100% {\n width: 100px;\n height: 70px;\n margin-top: -35px;\n margin-left: -50px;\n background-size: 100px;\n opacity: 0;\n }\n}\n@-moz-keyframes hide-arrow {\n 0% {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px;\n opacity: 1;\n }\n 20% {\n width: 480px;\n height: 330px;\n margin-top: -165px;\n margin-left: -240px;\n background-size: 480px;\n opacity: .9;\n }\n 100% {\n width: 100px;\n height: 70px;\n margin-top: -35px;\n margin-left: -50px;\n background-size: 100px;\n opacity: 0;\n display: none;\n }\n}\n@-webkit-keyframes card-in {\n 0% {\n opacity: 0;\n -webkit-transform: perspective(600px) scale(0.0) rotateY(180deg);\n }\n 100% {\n opacity: 1;\n -webkit-transform: perspective(600px) scale(1) rotateY(0deg);\n }\n}\n@-moz-keyframes card-in {\n 0% {\n opacity: 0;\n -webkit-transform: perspective(600px) scale(0.0) rotateY(180deg);\n }\n 100% {\n opacity: 1;\n -webkit-transform: perspective(600px) scale(1) rotateY(0deg);\n }\n}\n#card {\n opacity: 0;\n min-width: 290px;\n max-width: 290px;\n position: fixed;\n left: 50%;\n top: 40%;\n margin-top: -115px;\n margin-left: -145px;\n display: none;\n .p-link {\n width: 100%;\n margin-top: 10px;\n input {\n width: 100%;\n padding: 0;\n margin: 0;\n border: none;\n background: transparent;\n text-align: center;\n color: $color_suva_gray_approx;\n font-size: 13px;\n }\n }\n &.visible {\n display: block;\n opacity: 1;\n }\n}\n\n#card.show-card, #image-card.show-card {\n -webkit-animation: card-in .7s ease-in 1 forwards;\n -moz-animation: card-in .7s ease-in 1 forwards;\n opacity: 1;\n display: block;\n}\n\n#image-card {\n margin-top: 100px;\n display: none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n &.visible {\n display: block;\n opacity: 1;\n }\n &.zoomed {\n margin: 0;\n }\n}\n#card-info {\n width: 100%;\n position: relative;\n z-index: 50;\n background-color: $color_celeste_approx;\n border: 1px solid $color_alto_approx;\n padding-bottom: 20px;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n background-color: #cdcdcd;\n background-image: linear-gradient(bottom, rgb(242,242,242) 17%, rgb(250,250,250) 90%);\n background-image: -o-linear-gradient(bottom, rgb(242,242,242) 17%, rgb(250,250,250) 90%);\n background-image: -moz-linear-gradient(bottom, rgb(242,242,242) 17%, rgb(250,250,250) 90%);\n background-image: -webkit-linear-gradient(bottom, rgb(242,242,242) 17%, rgb(250,250,250) 90%);\n background-image: -ms-linear-gradient(bottom, rgb(242,242,242) 17%, rgb(250,250,250) 90%);\n background-image: -webkit-gradient(\n linear,\n left bottom,\n left top,\n color-stop(0.17, rgb(242,242,242)),\n color-stop(0.9, rgb(250,250,250))\n );\n}\n.file-icon {\n margin-top: 30px;\n img {\n width: 75px;\n }\n}\n.file-meta {\n span {\n font-family: $font_2, $font_1;\n font-size: 13px;\n color: $color_suva_gray_approx;\n &.sep {\n padding: 0 5px;\n }\n }\n .filename {\n font-weight: normal;\n color: $color_storm_dust_approx;\n font-size: 18px;\n font-family: $font_2, $font_1;\n //Instead of the line below you could use @include text-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)\n text-shadow: 0 1px 0 $white_80;\n padding: 0 20px;\n //Instead of the line below you could use @include word-break($value)\n word-break: break-all;\n }\n}\n#action-area {\n margin-top: 20px;\n a {\n font-family: $font_2, $font_1;\n display: inline-block;\n width: 37%;\n color: $white;\n padding: 7px 0;\n margin: 0 10px;\n font-size: 14px;\n //Instead of the line below you could use @include text-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)\n text-shadow: 0 1px 0 $black_30;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n &:hover {\n text-decoration: none;\n }\n }\n #download-link {\n background-color: $color_dodger_blue_approx;\n background-image: linear-gradient(bottom, rgb(31,106,180) 11%, rgb(41,141,241) 11%);\n background-image: -o-linear-gradient(bottom, rgb(31,106,180) 11%, rgb(41,141,241) 11%);\n background-image: -moz-linear-gradient(bottom, rgb(31,106,180) 11%, rgb(41,141,241) 11%);\n background-image: -webkit-linear-gradient(bottom, rgb(31,106,180) 11%, rgb(41,141,241) 11%);\n background-image: -ms-linear-gradient(bottom, rgb(31,106,180) 11%, rgb(41,141,241) 11%);\n background-image: -webkit-gradient(\n linear,\n left bottom,\n left top,\n color-stop(0.11, rgb(31,106,180)),\n color-stop(0.11, rgb(41,141,241))\n );\n }\n #play-link {\n background-image: linear-gradient(bottom, rgb(156,74,63) 11%, rgb(225,91,73) 11%);\n background-image: -o-linear-gradient(bottom, rgb(156,74,63) 11%, rgb(225,91,73) 11%);\n background-image: -moz-linear-gradient(bottom, rgb(156,74,63) 11%, rgb(225,91,73) 11%);\n background-image: -webkit-linear-gradient(bottom, rgb(156,74,63) 11%, rgb(225,91,73) 11%);\n background-image: -ms-linear-gradient(bottom, rgb(156,74,63) 11%, rgb(225,91,73) 11%);\n background-image: -webkit-gradient(\n linear,\n left bottom,\n left top,\n color-stop(0.11, rgb(156,74,63)),\n color-stop(0.11, rgb(225,91,73))\n );\n\n }\n}\n.invisible {\n display: none;\n}\n\n#image-preview {\n display: inline-block;\n max-height: 70%;\n max-width: 70%;\n padding: 4px;\n background-color: $color_black_haze_approx;\n border: 1px solid $color_alto_approx;\n //Instead of the line below you could use @include border-radius($radius, $vertical-radius)\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n cursor: zoom-in;\n cursor: -moz-zoom-in;\n cursor: -webkit-zoom-in;\n position: relative;\n z-index: 45;\n img {\n max-height: 70%;\n max-width: 100%;\n display: block;\n }\n &.zoomed {\n display: inline-block;\n max-width: none;\n max-height: none;\n cursor: zoom-out;\n cursor: -moz-zoom-out;\n cursor: -webkit-zoom-out;\n position: static;\n overflow: auto;\n padding: 4px 0;\n img {\n max-height: none;\n max-width: none;\n }\n #image-link {\n display: none;\n }\n }\n}\n#image-link input {\n width: 100%;\n border: none;\n outline: none;\n background: transparent;\n text-align: center;\n margin: 5px 0;\n color: $color_suva_gray_approx;\n}\n\n.qrcode {\n margin-top: 20px;\n}\n\n\n// WEBPACK FOOTER //\n// webpack:///sass-loader?sourceMap=true&sourceMapContents=true!./static/stylesheets/main.scss"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./static/stylesheets/main.scss"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,mCAAmC;;AAEnC;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,+CAA+C;AAC/C;AACA;AACA,yBAAyB;AACzB;AACA;AACA,uDAAuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA,eAAe;;AAEf;AACA;AACA,6DAA6D;;AAE7D;AACA;AACA,4DAA4D;;AAE5D;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA,6BAA6B;AAC7B;AACA,iCAAiC,EAAE;;AAEnC;AACA;AACA,6BAA6B;AAC7B;AACA,iCAAiC,EAAE;;AAEnC;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;;AAEhD;AACA;AACA;AACA;AACA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE;;AAEpB;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,iEAAiE,EAAE;;AAEnE;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,iEAAiE,EAAE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,eAAe;AACf;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAAyH;;AAEzH;AACA,mBAAmB;AACnB;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,cAAc;AACd;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H;;AAE5H;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA,sBAAsB;AACtB;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA,mBAAmB","file":"index.css","sourcesContent":["body {\n background-color: #63b6ae;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: center;\n margin: 0;\n padding: 0; }\n\ninput {\n -webkit-font-smoothing: antialiased;\n -moz-font-smoothing: antialiased; }\n\na {\n text-decoration: none; }\n\n#holder {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n opacity: 0;\n width: 100%;\n height: 100%; }\n\n.arrow {\n position: fixed;\n left: 50%;\n top: 45%;\n margin-top: -135px;\n margin-left: -200px;\n width: 400px;\n height: 270px;\n background-image: url(/static/img/arrow.svg);\n background-size: 400px;\n background-repeat: no-repeat;\n -webkit-transition: all .2s ease-out;\n -moz-transition: all .2s ease-out;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 8px; }\n .arrow.hover {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px; }\n .arrow.hover .alpha-bg {\n background-color: rgba(255, 255, 255, 0); }\n .arrow.hover .notice {\n height: 288px;\n line-height: 288px; }\n .arrow.hide {\n -webkit-animation: hide-arrow .5s ease-out 1 forwards;\n -moz-animation: hide-arrow .5s ease-out 1 forwards; }\n\n.alpha-bg {\n display: block;\n background-color: rgba(255, 255, 255, 0.15);\n height: 100%;\n width: 100%;\n position: relative;\n -webkit-transition: background-color .2s linear;\n -moz-transition: background-color .2s linear; }\n\n.notice {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n display: block;\n color: white;\n height: 254px;\n line-height: 254px;\n font-family: PT Sans Caption, sans-serif;\n font-size: 30px;\n font-weight: bold;\n opacity: 0;\n text-shadow: 1px 2px 1px rgba(30, 30, 30, 0.2); }\n .notice.show {\n opacity: 1; }\n\n#drag-notice {\n -webkit-transition: opacity, height, line-height .1s ease-out;\n -moz-transition: opacity, height, line-height .1s ease-out; }\n\n#drop-notice {\n -webkit-transition: opacity, height, line-height .3s ease-in;\n -moz-transition: opacity, height, line-height .3s ease-in; }\n\n#multi-notice {\n -webkit-transition: opacity .3s linear;\n -moz-transition: opacity .3s linear; }\n\n#progress {\n opacity: 0;\n -webkit-transition: opacity .3s linear;\n -moz-transition: opacity .3s linear;\n transition: opacity .3s linear;\n position: fixed;\n top: 40%;\n left: 50%;\n margin-left: -80px;\n display: none; }\n #progress.show {\n opacity: 1;\n display: block; }\n\n@-webkit-keyframes animate-stripes {\n 0% {\n background-position: 0 0; }\n 100% {\n background-position: -60px 0; } }\n\n@-moz-keyframes animate-stripes {\n 0% {\n background-position: 0 0; }\n 100% {\n background-position: -60px 0; } }\n\nprogress {\n background: #e9ebef;\n -webkit-border-radius: 10px;\n -moz-border-radius: 10px;\n border-radius: 10px; }\n\nprogress::-moz-progress-bar {\n -webkit-border-radius: 9px;\n -moz-border-radius: 9px;\n border-radius: 9px;\n background-color: #5e544b;\n background-size: 30px 30px;\n background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n -moz-animation: animate-stripes 3s linear infinite;\n animation: animate-stripes 3s linear infinite; }\n\nprogress::-webkit-progress-bar {\n background: #e9ebef;\n -webkit-border-radius: 10px;\n -moz-border-radius: 10px;\n border-radius: 10px; }\n\nprogress::-webkit-progress-value {\n -webkit-border-radius: 9px;\n -moz-border-radius: 9px;\n border-radius: 9px;\n background-color: #5e544b;\n -webkit-background-size: 30px 30px;\n -moz-background-size: 30px 30px;\n background-size: 30px 30px;\n background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n -webkit-animation: animate-stripes 3s linear infinite;\n -moz-animation: animate-stripes 3s linear infinite; }\n\n@-webkit-keyframes hide-arrow {\n 0% {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px;\n opacity: 1; }\n 20% {\n width: 480px;\n height: 330px;\n margin-top: -165px;\n margin-left: -240px;\n background-size: 480px;\n opacity: .9; }\n 100% {\n width: 100px;\n height: 70px;\n margin-top: -35px;\n margin-left: -50px;\n background-size: 100px;\n opacity: 0; } }\n\n@-moz-keyframes hide-arrow {\n 0% {\n width: 450px;\n height: 304px;\n margin-top: -152px;\n margin-left: -225px;\n background-size: 450px;\n opacity: 1; }\n 20% {\n width: 480px;\n height: 330px;\n margin-top: -165px;\n margin-left: -240px;\n background-size: 480px;\n opacity: .9; }\n 100% {\n width: 100px;\n height: 70px;\n margin-top: -35px;\n margin-left: -50px;\n background-size: 100px;\n opacity: 0;\n display: none; } }\n\n@-webkit-keyframes card-in {\n 0% {\n opacity: 0;\n -webkit-transform: perspective(600px) scale(0) rotateY(180deg); }\n 100% {\n opacity: 1;\n -webkit-transform: perspective(600px) scale(1) rotateY(0deg); } }\n\n@-moz-keyframes card-in {\n 0% {\n opacity: 0;\n -webkit-transform: perspective(600px) scale(0) rotateY(180deg); }\n 100% {\n opacity: 1;\n -webkit-transform: perspective(600px) scale(1) rotateY(0deg); } }\n\n#card {\n opacity: 0;\n min-width: 290px;\n max-width: 290px;\n position: fixed;\n left: 50%;\n top: 40%;\n margin-top: -115px;\n margin-left: -145px;\n display: none; }\n #card .p-link {\n width: 100%;\n margin-top: 10px; }\n #card .p-link input {\n width: 100%;\n padding: 0;\n margin: 0;\n border: none;\n background: transparent;\n text-align: center;\n color: #888;\n font-size: 13px; }\n #card.visible {\n display: block;\n opacity: 1; }\n\n#card.show-card, #image-card.show-card {\n -webkit-animation: card-in .7s ease-in 1 forwards;\n -moz-animation: card-in .7s ease-in 1 forwards;\n opacity: 1;\n display: block; }\n\n#image-card {\n margin-top: 100px;\n display: none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box; }\n #image-card.visible {\n display: block;\n opacity: 1; }\n #image-card.zoomed {\n margin: 0; }\n\n#card-info {\n width: 100%;\n position: relative;\n z-index: 50;\n background-color: #cdcdcd;\n border: 1px solid #dcdcdc;\n padding-bottom: 20px;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n background-color: #cdcdcd;\n background-image: linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%);\n background-image: -o-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%);\n background-image: -moz-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%);\n background-image: -webkit-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%);\n background-image: -ms-linear-gradient(bottom, #f2f2f2 17%, #fafafa 90%);\n background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.17, #f2f2f2), color-stop(0.9, #fafafa)); }\n\n.file-icon {\n margin-top: 30px; }\n .file-icon img {\n width: 75px; }\n\n.file-meta span {\n font-family: PT Sans, sans-serif;\n font-size: 13px;\n color: #888; }\n .file-meta span.sep {\n padding: 0 5px; }\n\n.file-meta .filename {\n font-weight: normal;\n color: #666;\n font-size: 18px;\n font-family: PT Sans, sans-serif;\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);\n padding: 0 20px;\n word-break: break-all; }\n\n#action-area {\n margin-top: 20px; }\n #action-area a {\n font-family: PT Sans, sans-serif;\n display: inline-block;\n width: 37%;\n color: white;\n padding: 7px 0;\n margin: 0 10px;\n font-size: 14px;\n text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px; }\n #action-area a:hover {\n text-decoration: none; }\n #action-area #download-link {\n background-color: #298cf1;\n background-image: linear-gradient(bottom, #1f6ab4 11%, #298df1 11%);\n background-image: -o-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%);\n background-image: -moz-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%);\n background-image: -webkit-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%);\n background-image: -ms-linear-gradient(bottom, #1f6ab4 11%, #298df1 11%);\n background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.11, #1f6ab4), color-stop(0.11, #298df1)); }\n #action-area #play-link {\n background-image: linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%);\n background-image: -o-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%);\n background-image: -moz-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%);\n background-image: -webkit-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%);\n background-image: -ms-linear-gradient(bottom, #9c4a3f 11%, #e15b49 11%);\n background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.11, #9c4a3f), color-stop(0.11, #e15b49)); }\n\n.invisible {\n display: none; }\n\n#image-preview {\n display: inline-block;\n max-height: 70%;\n max-width: 70%;\n padding: 4px;\n background-color: #f6f6f6;\n border: 1px solid #dcdcdc;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n cursor: zoom-in;\n cursor: -moz-zoom-in;\n cursor: -webkit-zoom-in;\n position: relative;\n z-index: 45; }\n #image-preview img {\n max-height: 70%;\n max-width: 100%;\n display: block; }\n #image-preview.zoomed {\n display: inline-block;\n max-width: none;\n max-height: none;\n cursor: zoom-out;\n cursor: -moz-zoom-out;\n cursor: -webkit-zoom-out;\n position: static;\n overflow: auto;\n padding: 4px 0; }\n #image-preview.zoomed img {\n max-height: none;\n max-width: none; }\n #image-preview.zoomed #image-link {\n display: none; }\n\n#image-link input {\n width: 100%;\n border: none;\n outline: none;\n background: transparent;\n text-align: center;\n margin: 5px 0;\n color: #888; }\n\n.qrcode {\n margin-top: 20px; }\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/dist/index.js b/static/dist/index.js index 23bbc32..4ebc8a0 100644 --- a/static/dist/index.js +++ b/static/dist/index.js @@ -1,24 +1,43 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/Users/linwei/workspace/filepaste/r/static/dist",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){a.default.render(a.default.createElement(s.default,null),document.getElementById("main"))}var i=n(1),a=r(i),u=n(152),s=r(u);n(154),o()},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";var r=n(3),o=n(7),i=n(21),a=n(36),u=n(11),s=n(16),l=n(10),c=(n(31),n(39)),p=n(41),d=n(90),f=n(18),h=n(66),v=n(27),m=n(121),g=n(28),y=n(149),C=n(12),E=n(110),b=n(151);d.inject();var _=l.createElement,x=l.createFactory,D=l.cloneElement,M=v.measure("React","render",h.render),N={Children:{map:o.map,forEach:o.forEach,count:o.count,only:b},Component:i,DOM:c,PropTypes:m,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createElement:_,cloneElement:D,createFactory:x,createMixin:function(e){return e},constructAndRenderComponent:h.constructAndRenderComponent,constructAndRenderComponentByID:h.constructAndRenderComponentByID,findDOMNode:E,render:M,renderToString:y.renderToString,renderToStaticMarkup:y.renderToStaticMarkup,unmountComponentAtNode:h.unmountComponentAtNode,isValidElement:l.isValidElement,withContext:u.withContext,__spread:C};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:s,InstanceHandles:f,Mount:h,Reconciler:g,TextComponent:p});N.version="0.13.3",e.exports=N},function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function i(e){return e===m.topMouseDown||e===m.topTouchStart}function a(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o1){for(var d=Array(p),f=0;f1){for(var f=Array(d),h=0;h1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:l,_getNextDescendantID:s,isAncestorIDOf:a,SEPARATOR:f};e.exports=m},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e,t){this.props=e,this.context=t}var o=n(22),i=n(6);n(14);r.prototype.setState=function(e,t){i("object"==typeof e||"function"==typeof e||null==e),o.enqueueSetState(this,e),t&&o.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)};e.exports=r},function(e,t,n){"use strict";function r(e){e!==i.currentlyMountingInstance&&l.enqueueUpdate(e)}function o(e,t){p(null==a.current);var n=s.get(e);return n?n===i.currentlyUnmountingInstance?null:n:null}var i=n(23),a=n(16),u=n(10),s=n(24),l=n(25),c=n(12),p=n(6),d=(n(14),{enqueueCallback:function(e,t){p("function"==typeof t);var n=o(e);return n&&n!==i.currentlyMountingInstance?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){p("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement,a=c({},i.props,t);n._pendingElement=u.cloneAndReplaceProps(i,a),r(n)}},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement;n._pendingElement=u.cloneAndReplaceProps(i,t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});e.exports=d},function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};e.exports=n},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";function r(){m(N.ReactReconcileTransaction&&E)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=N.ReactReconcileTransaction.getPooled()}function i(e,t,n,o,i){r(),E.batchedUpdates(e,t,n,o,i)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;m(t===g.length),g.sort(a);for(var n=0;n");var u="";o&&(u=" The element was created by "+o+".")}}function d(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function f(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&d(t[r],n[r])||(p(r,e),t[r]=n[r]))}}function h(e){if(null!=e.type){var t=C.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&c(n,t.propTypes,e.props,g.prop),"function"==typeof t.getDefaultProps}}var v=n(10),m=n(9),g=n(32),y=(n(33),n(16)),C=n(34),E=n(20),b=n(6),_=(n(14),{}),x={},D=/^\d+$/,M={},N={checkAndWarnForMutatedProps:f,createElement:function(e,t,n){var r=v.createElement.apply(this,arguments);if(null==r)return r;for(var o=2;o"+o+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=s},function(e,t,n){"use strict";function r(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasNumericValue[e]&&isNaN(t)||o.hasPositiveNumericValue[e]&&t<1||o.hasOverloadedBooleanValue[e]&&t===!1}var o=n(43),i=n(44),a=(n(14),{createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,t))return"";var n=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&t===!0?n:n+"="+i(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+i(t):null},setValueForProperty:function(e,t,n){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,n);else if(r(t,n))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+n);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&""+e[a]==""+n||(e[a]=n)}}else o.isCustomAttribute(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,r);o.hasSideEffects[t]&&""+e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}});e.exports=a},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(6),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},n=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},s=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var l in t){o(!u.isStandardName.hasOwnProperty(l)),u.isStandardName[l]=!0;var c=l.toLowerCase();if(u.getPossibleStandardName[c]=l,n.hasOwnProperty(l)){var p=n[l];u.getPossibleStandardName[p]=l,u.getAttributeName[l]=p}else u.getAttributeName[l]=c;u.getPropertyName[l]=a.hasOwnProperty(l)?a[l]:l,s.hasOwnProperty(l)?u.getMutationMethod[l]=s[l]:u.getMutationMethod[l]=null;var d=t[l];u.mustUseAttribute[l]=r(d,i.MUST_USE_ATTRIBUTE),u.mustUseProperty[l]=r(d,i.MUST_USE_PROPERTY),u.hasSideEffects[l]=r(d,i.HAS_SIDE_EFFECTS),u.hasBooleanValue[l]=r(d,i.HAS_BOOLEAN_VALUE),u.hasNumericValue[l]=r(d,i.HAS_NUMERIC_VALUE),u.hasPositiveNumericValue[l]=r(d,i.HAS_POSITIVE_NUMERIC_VALUE),u.hasOverloadedBooleanValue[l]=r(d,i.HAS_OVERLOADED_BOOLEAN_VALUE),o(!u.mustUseAttribute[l]||!u.mustUseProperty[l]),o(u.mustUseProperty[l]||!u.hasSideEffects[l]),o(!!u.hasBooleanValue[l]+!!u.hasNumericValue[l]+!!u.hasOverloadedBooleanValue[l]<=1)}}},a={},u={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(47),o=n(66),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};e.exports=i},function(e,t,n){"use strict";var r=n(48),o=n(57),i=n(42),a=n(66),u=n(27),s=n(6),l=n(65),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,t,n){var r=a.getNode(e);s(!c.hasOwnProperty(t)),null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=a.getNode(e);s(!c.hasOwnProperty(t)),i.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var n=a.getNode(e);r.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);l(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);o.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){s(o.canUseDOM);for(var t,n={},p=0;p":a.innerHTML="<"+e+">",u[e]=!a.firstChild),u[e]?d[e]:null}var o=n(50),i=n(6),a=o.canUseDOM?document.createElement("div"):null,u={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,"",""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r},function(e,t,n){"use strict";var r=n(5),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(50),o=n(45),i=n(65),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";var r=n(50),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r-1),!l.plugins[n]){a(t.extractEvents),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)a(o(r[i],t,i))}}}function o(e,t,n){a(!l.eventNameDispatchConfigs.hasOwnProperty(n)),l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){a(!l.registrationNameModules[e]),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(6),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a(!u),u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(a(!s[n]),s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e,t){if(o(null!=t),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=n(6);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue()}var o=n(68),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";/** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - */ -function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(50);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";function r(e){c[e]=!0}function o(e){delete c[e]}function i(e){return!!c[e]}var a,u=n(10),s=n(24),l=n(6),c={},p={injectEmptyComponent:function(e){a=u.createFactory(e)}},d=function(){};d.prototype.componentDidMount=function(){var e=s.get(this);e&&r(e._rootNodeID)},d.prototype.componentWillUnmount=function(){var e=s.get(this);e&&o(e._rootNodeID)},d.prototype.render=function(){return l(a),a()};var f=u.createElement(d),h={emptyElement:f,injection:p,isNullComponentID:i};e.exports=h},function(e,t,n){"use strict";var r=n(77),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(b.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===x&&(i&&(i=this._previousStyleCopy=v({},t.style)),i=u.createMarkupForStyles(i));var a=l.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var s=l.createMarkupForID(this._rootNodeID);return n+" "+s+">"},_createContentMarkup:function(e,t){var n="";"listing"!==this._tag&&"pre"!==this._tag&&"textarea"!==this._tag||(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=_[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var u=this.mountChildren(a,e,t);return n+u.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){r(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,r,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===x){var u=this._previousStyleCopy;for(r in u)u.hasOwnProperty(r)&&(i=i||{},i[r]="");this._previousStyleCopy=null}else b.hasOwnProperty(n)?C(this._rootNodeID,n):(s.isStandardName[n]||s.isCustomAttribute(n))&&M.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===x?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===x)if(l?l=this._previousStyleCopy=v({},l):this._previousStyleCopy=null,c){for(r in c)!c.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in l)l.hasOwnProperty(r)&&c[r]!==l[r]&&(i=i||{},i[r]=l[r])}else i=l;else b.hasOwnProperty(n)?o(this._rootNodeID,n,l,t):(s.isStandardName[n]||s.isCustomAttribute(n))&&M.updatePropertyByID(this._rootNodeID,n,l)}i&&M.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=_[typeof e.children]?e.children:null,i=_[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&M.updateInnerHTMLByID(this._rootNodeID,u):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},h.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),v(a.prototype,a.Mixin,f.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=M=e}},e.exports=a},function(e,t,n){"use strict";function r(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:v.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function u(){h.length&&(l.processChildrenUpdates(h,v),s())}function s(){h.length=0,v.length=0}var l=n(84),c=n(63),p=n(28),d=n(88),f=0,h=[],v=[],m={Mixin:{mountChildren:function(e,t,n){var r=d.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=this._rootNodeID+a,l=p.mountComponent(u,s,t,n);u._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){f++;var t=!0;try{var n=this._renderedChildren;d.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{f--,f||(t?s():u())}},updateChildren:function(e,t,n){f++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{f--,f||(r?s():u())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=d.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,u=0;for(i in o)if(o.hasOwnProperty(i)){var s=r&&r[i],l=o[i];s===l?(this.moveChild(s,u,a),a=Math.max(s._mountIndex,a),s._mountIndex=u):(s&&(a=Math.max(s._mountIndex,a),this._unmountChildByName(s,i)),this._mountChildByNameAtIndex(l,i,u,t,n)),u++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;d.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex8&&x<=11),N=32,I=String.fromCharCode(N),P=f.topLevelTypes,T={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[P.topCompositionEnd,P.topKeyPress,P.topTextInput,P.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[P.topBlur,P.topCompositionEnd,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[P.topBlur,P.topCompositionStart,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[P.topBlur,P.topCompositionUpdate,P.topKeyDown,P.topKeyPress,P.topKeyUp,P.topMouseDown]}},w=!1,R=null,O={eventTypes:T,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};e.exports=O},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return m(e,r)}function o(e,t,n){var o=t?v.bubbled:v.captured,i=r(e,n,o);i&&(n._dispatchListeners=f(n._dispatchListeners,i),n._dispatchIDs=f(n._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(e,r);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchIDs=f(n._dispatchIDs,e))}}function u(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function s(e){h(e,i)}function l(e,t,n,r){d.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function c(e){h(e,u)}var p=n(4),d=n(68),f=n(70),h=n(71),v=p.PropagationPhases,m=d.getListener,g={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:l};e.exports=g},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(8),i=n(12),a=n(94);i(r.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(50),i=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(96),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=n(8),i=n(12),a=n(15),u=n(97),s={type:null,target:u,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(96),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=x.getPooled(P.change,w,e);E.accumulateTwoPhaseDispatches(t),_.batchedUpdates(i,t)}function i(e){C.enqueueEvents(e),C.processEventQueue()}function a(e,t){T=e,w=t,T.attachEvent("onchange",o)}function u(){T&&(T.detachEvent("onchange",o),T=null,w=null)}function s(e,t,n){if(e===I.topChange)return n}function l(e,t,n){e===I.topFocus?(u(),a(t,n)):e===I.topBlur&&u()}function c(e,t){T=e,w=t,R=e.value,O=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",k),T.attachEvent("onpropertychange",d)}function p(){T&&(delete T.value,T.detachEvent("onpropertychange",d),T=null,w=null,R=null,O=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,o(e))}}function f(e,t,n){if(e===I.topInput)return n}function h(e,t,n){e===I.topFocus?(p(),c(t,n)):e===I.topBlur&&p()}function v(e,t,n){if((e===I.topSelectionChange||e===I.topKeyUp||e===I.topKeyDown)&&T&&T.value!==R)return R=T.value,w}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){if(e===I.topClick)return n}var y=n(4),C=n(68),E=n(92),b=n(50),_=n(25),x=n(96),D=n(74),M=n(100),N=n(38),I=y.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:N({onChange:null}),captured:N({onChangeCapture:null})},dependencies:[I.topBlur,I.topChange,I.topClick,I.topFocus,I.topInput,I.topKeyDown,I.topKeyUp,I.topSelectionChange]}},T=null,w=null,R=null,O=null,S=!1;b.canUseDOM&&(S=D("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;b.canUseDOM&&(A=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return O.get.call(this)},set:function(e){R=""+e,O.set.call(this,e)}},L={eventTypes:P,extractEvents:function(e,t,n,o){var i,a;if(r(t)?S?i=s:a=l:M(t)?A?i=f:(i=v,a=h):m(t)&&(i=g),i){var u=i(e,t,n);if(u){var c=x.getPooled(P.change,u,o);return E.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,n)}};e.exports=L},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";var r=n(38),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(4),o=n(92),i=n(104),a=n(66),u=n(38),s=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(t.window===t)u=t;else{var d=t.ownerDocument;u=d?d.defaultView||d.parentWindow:window}var f,h;if(e===s.topMouseOut?(f=t,h=l(r.relatedTarget||r.toElement)||u):(f=u,h=t),f===h)return null;var v=f?a.getID(f):"",m=h?a.getID(h):"",g=i.getPooled(c.mouseLeave,v,r);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=i.getPooled(c.mouseEnter,m,r);return y.type="mouseenter",y.target=h,y.relatedTarget=f,o.accumulateEnterLeaveDispatches(g,y,v,m),p[0]=g,p[1]=y,p}};e.exports=d},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(105),i=n(73),a=n(106),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,u),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(96),i=n(97),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";var r,o=n(43),i=n(50),a=o.injection.MUST_USE_ATTRIBUTE,u=o.injection.MUST_USE_PROPERTY,s=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|s,allowTransparency:a,alt:null,async:s,autoComplete:null,autoPlay:s,cellPadding:null,cellSpacing:null,charSet:a,checked:u|s,classID:a,className:r?a:u,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:u|s,coords:null,crossOrigin:null,data:null,dateTime:a,defer:s,dir:null,disabled:a|s,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:s,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:u,label:null,lang:null,list:a,loop:u|s,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:u|s,muted:u|s,name:null,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:u|s,rel:null,required:s,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:a|s,selected:u|s,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:u,srcSet:a,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:u|l,width:a,wmode:a,autoCapitalize:null, -autoCorrect:null,itemProp:a,itemScope:a|s,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(4),o=n(15),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};e.exports=a},function(e,t,n){"use strict";var r=n(110),o={getDOMNode:function(){return r(this)}};e.exports=o},function(e,t,n){"use strict";function r(e){return null==e?null:u(e)?e:o.has(e)?i.getNodeFromInstance(e):(a(null==e.render||"function"!=typeof e.render),void a(!1))}var o=(n(16),n(24)),i=n(66),a=n(6),u=n(80);n(14);e.exports=r},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(25),i=n(35),a=n(12),u=n(15),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:o.flushBatchedUpdates.bind(o)},c=[l,s];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o):p.perform(e,null,t,n,r,o)}};e.exports=d},function(e,t,n){"use strict";var r=n(113),o=n(109),i=n(36),a=n(10),u=n(5),s=a.createFactory("button"),l=u({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[r,o],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&l[t]||(e[t]=this.props[t]);return s(e,this.props.children)}});e.exports=c},function(e,t,n){"use strict";var r=n(114),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(e){}}e.exports=n},function(e,t,n){"use strict";var r=n(4),o=n(116),i=n(109),a=n(36),u=n(10),s=u.createFactory("form"),l=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,o],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});e.exports=l},function(e,t,n){"use strict";function r(e){e.remove()}var o=n(67),i=n(70),a=n(71),u=n(6),s={trapBubbledEvent:function(e,t){u(this.isMounted());var n=this.getDOMNode();u(n);var r=o.trapBubbledEvent(e,t,n);this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};e.exports=s},function(e,t,n){"use strict";var r=n(4),o=n(116),i=n(109),a=n(36),u=n(10),s=u.createFactory("img"),l=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});e.exports=l},function(e,t,n){"use strict";var r=n(4),o=n(116),i=n(109),a=n(36),u=n(10),s=u.createFactory("iframe"),l=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,o],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load")}});e.exports=l},function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=n(113),i=n(42),a=n(120),u=n(109),s=n(36),l=n(10),c=n(66),p=n(25),d=n(12),f=n(6),h=l.createFactory("input"),v={},m=s.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[o,a.Mixin,u],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=d({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,h(e,this.props.children)},componentDidMount:function(){var e=c.getID(this.getDOMNode());v[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=c.getID(e);delete v[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var t,n=a.getOnChange(this);n&&(t=n.call(this,e)),p.asap(r,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),u=i;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),l=0,d=s.length;l>",_=u(),x=d(),D={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:_,instanceOf:s,node:x,objectOf:c,oneOf:l,oneOfType:p,shape:f};e.exports=D},function(e,t,n){"use strict";var r=n(109),o=n(36),i=n(10),a=(n(14),i.createFactory("option")),u=o.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[r],componentWillMount:function(){},render:function(){return a(this.props,this.props.children)}});e.exports=u},function(e,t,n){"use strict";function r(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=u.getValue(this);null!=e&&this.isMounted()&&i(this,e)}}function o(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to must be a scalar value if `multiple` is false.")}function i(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;rt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=l(e,o),s=l(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(50),l=n(132),c=n(94),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=d},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,i<=t&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=n(8),i=n(67),a=n(12);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(142),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(104),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(105),i=n(106),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(104),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";var r=n(43),o=r.injection.MUST_USE_ATTRIBUTE,i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};e.exports=i},function(e,t,n){"use strict";function r(e){var t=i.createFactory(e),n=o.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){a(!1)},render:function(){return t(this.props)}});return n}var o=n(36),i=n(10),a=n(6);e.exports=r},function(e,t,n){"use strict";function r(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=s.getPooled(!1),t.perform(function(){var r=c(e,null),o=r.mountComponent(n,t,l);return u.addChecksumToMarkup(o)},null)}finally{s.release(t)}}function o(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=s.getPooled(!0),t.perform(function(){var r=c(e,null);return r.mountComponent(n,t,l)},null)}finally{s.release(t)}}var i=n(10),a=n(18),u=n(76),s=n(150),l=n(13),c=n(82),p=n(6);e.exports={renderToString:r,renderToStaticMarkup:o}},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=n(8),i=n(26),a=n(134),u=n(35),s=n(12),l=n(15),c={initialize:function(){this.reactMountReady.reset()},close:l},p={initialize:function(){this.putListenerQueue.reset()},close:l},d=[p,c],f={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){ -return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};s(r.prototype,u.Mixin,f),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return i(o.isValidElement(e)),e}var o=n(10),i=n(6);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nD.length&&D.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,l){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(l,t,""===n?"."+U(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ce,e.release=se}l(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ie)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ie)},persist:function(){this.isPersistent=ie},isPersistent:ae,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ae,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return l(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var de=ue.extend({data:null}),pe=ue.extend({data:null}),me=[9,13,27,32],he=$&&"CompositionEvent"in window,ye=null;$&&"documentMode"in document&&(ye=document.documentMode);var ve=$&&"TextEvent"in window&&!ye,ge=$&&(!he||ye&&8=ye),be=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ke=!1;function xe(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Te(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var _e=!1;var Ee={eventTypes:we,extractEvents:function(e,t,n,r){var l=void 0,o=void 0;if(he)e:{switch(e){case"compositionstart":l=we.compositionStart;break e;case"compositionend":l=we.compositionEnd;break e;case"compositionupdate":l=we.compositionUpdate;break e}l=void 0}else _e?xe(e,n)&&(l=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(l=we.compositionStart);return l?(ge&&"ko"!==n.locale&&(_e||l!==we.compositionStart?l===we.compositionEnd&&_e&&(o=oe()):(re="value"in(ne=r)?ne.value:ne.textContent,_e=!0)),l=de.getPooled(l,t,n,r),o?l.data=o:null!==(o=Te(n))&&(l.data=o),H(l),o=l):o=null,(e=ve?function(e,t){switch(e){case"compositionend":return Te(t);case"keypress":return 32!==t.which?null:(ke=!0,be);case"textInput":return(e=t.data)===be&&ke?null:e;default:return null}}(e,n):function(e,t){if(_e)return"compositionend"===e||!he&&xe(e,t)?(e=oe(),le=re=ne=null,_e=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1