fetch => axios, some nice upload ux

This commit is contained in:
Roman committed 2021-03-31 01:48:16 +02:00
1 parent fb91b9e879
commit 5a169488af
7 files changed
+17343 -283

No files matched your search

+58 -49
View File
@@ -469,8 +469,10 @@ namespace Api\File {
return $this->success;
}
$fileKeys = array_keys($_FILES);
$numFilesUploaded = count($fileKeys);
$numFilesUploaded = array_sum(array_map(function($fileEntry) {
return is_array($fileEntry["name"]) ? count($fileEntry["name"]) : 1;
}, $_FILES
));
if (!is_null($token)) {
@@ -511,30 +513,43 @@ namespace Api\File {
}
$count = $res[0]["count"];
if ($maxFiles > 0 && $numFilesUploaded > 0 && $numFilesUploaded + $count > $maxFiles) {
return $this->createError("File limit exceeded. Currently uploaded $count / $maxFiles files");
}
if ($maxSize > 0 || !empty($extensions)) {
foreach ($_FILES as $file) {
$name = $file["name"];
if ($maxSize > 0 && $file["size"] > $maxSize) {
return $this->createError("File Size limit of $maxSize bytes exceeded for file $name");
}
$dotPos = strrpos($name, ".");
$ext = ($dotPos !== false ? strtolower(substr($name, $dotPos + 1)) : false);
if (!empty($extensions) && $ext !== false && !in_array($ext, $extensions)) {
return $this->createError("File '$name' has prohibited extension. Allowed extensions: " . implode(",", $extensions));
}
}
}
} else {
$userId = $this->user->getId();
$maxSize = 0;
$count = 0;
$maxFiles = 0;
$extensions = array();
}
$maxSize = ($maxSize <= 0 ? $this->getMaxFileSizePHP() : min($maxSize, $this->getMaxFileSizePHP()));
$maxFiles = ($maxFiles <= 0 ? $this->getMaxFiles() : min($maxFiles, $this->getMaxFiles()));
if ($numFilesUploaded === 0) {
return $this->createError("No file uploaded");
} else if($numFilesUploaded > 1) {
return $this->createError("You can only upload one file at once");
}
if ($maxFiles > 0 && $count + 1 > $maxFiles) {
return $this->createError("File upload limit exceeded. Currently uploaded $count / $maxFiles files");
}
$fileObject = array_shift($_FILES);
$fileName = (is_array($fileObject["name"]) ? $fileObject["name"][0] : $fileObject["name"]);
$fileSize = (is_array($fileObject["size"]) ? $fileObject["size"][0] : $fileObject["size"]);
$tmpPath = (is_array($fileObject["tmp_name"]) ? $fileObject["tmp_name"][0] : $fileObject["tmp_name"]);
$fileError = (is_array($fileObject["error"]) ? $fileObject["error"][0] : $fileObject["error"]);
if ($maxSize > 0 || !empty($extensions)) {
if ($maxSize > 0 && $fileSize > $maxSize) {
return $this->createError("File Size limit of $maxSize bytes exceeded for file $fileName");
}
$dotPos = strrpos($fileName, ".");
$ext = ($dotPos !== false ? strtolower(substr($fileName, $dotPos + 1)) : false);
if (!empty($extensions) && $ext !== false && !in_array($ext, $extensions)) {
return $this->createError("File '$fileName' has prohibited extension. Allowed extensions: " . implode(",", $extensions));
}
}
$uploadDir = realpath($_SERVER["DOCUMENT_ROOT"] . "/files/uploaded/");
@@ -542,47 +557,40 @@ namespace Api\File {
return $this->createError("Upload directory is not writable");
}
$fileIds = array();
foreach ($_FILES as $key => $file) {
$fileName = $file["name"];
$tmpPath = $file["tmp_name"];
if (!$tmpPath) {
return $this->createError("Error uploading file: $fileName");
}
if (!$tmpPath) {
return $this->createError("Error uploading file: $fileError");
}
$md5Hash = @hash_file('md5', $tmpPath);
$sha1Hash = @hash_file('sha1', $tmpPath);
$filePath = $uploadDir . "/" . $md5Hash . $sha1Hash;
if (move_uploaded_file($tmpPath, $filePath)) {
$md5Hash = @hash_file('md5', $tmpPath);
$sha1Hash = @hash_file('sha1', $tmpPath);
$filePath = $uploadDir . "/" . $md5Hash . $sha1Hash;
if (file_exists($filePath) || move_uploaded_file($tmpPath, $filePath)) {
$res = $sql->insert("UserFile", array("name", "directory", "path", "user_id", "parent_id"))
->addRow($fileName, false, $filePath, $userId, $parentId)
->returning("uid")
->execute();
$res = $sql->insert("UserFile", array("name", "directory", "path", "user_id", "parent_id"))
->addRow($fileName, false, $filePath, $userId, $parentId)
->returning("uid")
->execute();
if ($res === false) {
$this->lastError = $sql->getLastError();
$this->success = false;
return false;
} else {
$fileIds[] = $sql->getLastInsertId();
}
if ($res === false) {
$this->lastError = $sql->getLastError();
$this->success = false;
return false;
} else {
return $this->createError("Could not create file: " . $fileName);
$fileId = $sql->getLastInsertId();
}
} else {
return $this->createError("Could not create file: $fileName");
}
if (!is_null($token)) {
$query = $sql->insert("UserFileTokenFile", array("file_id", "token_id"));
foreach ($fileIds as $fileId) {
$query->addRow($fileId, $tokenId);
}
$res = $sql->insert("UserFileTokenFile", array("file_id", "token_id"))
->addRow($fileId, $tokenId)
->execute();
$res = $query->execute();
$this->success = ($res !== false);
$this->lastError = $sql->getLastError();
}
$this->result["fileId"] = $fileId;
return $this->success;
}
}
@@ -651,6 +659,7 @@ namespace Api\File {
}
}
// TODO: delete permanently from filesystem
class Delete extends FileAPI {
public function __construct(User $user, bool $externalCall = false) {
+17007 -16
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.21.1",
"moment": "^2.26.0",
"react": "^16.13.1",
"react-collapse": "^5.0.1",
+12 -21
View File
@@ -1,4 +1,5 @@
import 'babel-polyfill';
import axios from "axios";
export default class API {
@@ -13,24 +14,18 @@ export default class API {
async apiCall(method, params) {
params = params || { };
const csrf_token = this.csrfToken();
if (csrf_token) params.csrf_token = csrf_token;
let response = await fetch("/api/" + method, {
method: 'post',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(params)
});
return await response.json();
let response = await axios.post("/api/" + method, params);
return response.data;
}
async fetchUser() {
let response = await fetch("/api/user/info");
let data = await response.json();
let response = await axios.get("/api/user/info");
let data = response.data;
this.user = data["user"];
this.loggedIn = data["loggedIn"];
return data && data.success && data.loggedIn;
return data && data["success"] && data["loggedIn"];
}
async logout() {
@@ -73,24 +68,20 @@ export default class API {
return this.apiCall("file/getRestrictions");
}
async upload(files, token = null, parentId = null) {
async upload(file, token = null, parentId = null, onUploadProgress = null) {
const csrf_token = this.csrfToken();
const fd = new FormData();
for (let i = 0; i < files.length; i++) {
fd.append('file' + i, files[i]);
}
fd.append("file", file);
if (csrf_token) fd.append("csrf_token", csrf_token);
if (token) fd.append("token", token);
if (parentId) fd.append("parentId", parentId);
// send `POST` request
let response = await fetch('/api/file/upload', {
method: 'POST',
body: fd
let response = await axios.post('/api/file/upload', fd, {
headers: { 'Content-Type': 'multipart/form-data' },
onUploadProgress: onUploadProgress || function () { }
});
return response.json();
return response.data;
}
};
@@ -40,8 +40,7 @@
word-wrap: break-word;
}
.uploaded-file > i:nth-child(3) {
color: red;
.uploaded-file > .status-icon {
position: absolute;
top: -9px;
right: 25px;
+257 -188
View File
@@ -4,62 +4,64 @@ import Dropzone from "react-dropzone";
import Icon from "./icon";
import Alert from "./alert";
import {Popup} from "./popup";
import {useState} from "react";
import {useEffect, useState} from "react";
export function FileBrowser(props) {
let files = props.files || { };
let files = props.files || {};
let api = props.api;
let tokenObj = props.token || { valid: false };
let onSelectFile = props.onSelectFile || function() { };
let onFetchFiles = props.onFetchFiles || function() { };
let directories = props.directories || {};
let restrictions = props.restrictions || { maxFiles: 0, maxSize: 0, extensions: "" };
let tokenObj = props.token || {valid: false};
let onSelectFile = props.onSelectFile || function () { };
let onFetchFiles = props.onFetchFiles || function () { };
let directories = props.directories || {};
let restrictions = props.restrictions || {maxFiles: 0, maxSize: 0, extensions: ""};
let [popup, setPopup] = useState({ visible: false, directoryName: "", directory: 0, type: "upload" });
let [alerts, setAlerts] = useState( []);
let [popup, setPopup] = useState({visible: false, directoryName: "", directory: 0, type: "upload"});
let [alerts, setAlerts] = useState([]);
let [filesToUpload, setFilesToUpload] = useState([]);
function svgMiddle(scale=1.0) {
function svgMiddle(key, scale = 1.0) {
let width = 48 * scale;
let height = 64 * scale;
return <svg width={width} height={height} xmlns="http://www.w3.org/2000/svg">
return <svg key={key} width={width} height={height} xmlns="http://www.w3.org/2000/svg">
<g>
<line y2="0" x2={width/2} y1={height} x1={width/2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2={height/2} x2={width} y1={height/2} x1={width/2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2="0" x2={width / 2} y1={height} x1={width / 2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2={height / 2} x2={width} y1={height / 2} x1={width / 2} strokeWidth="1.5" stroke="#000"
fill="none"/>
</g>
</svg>;
}
function svgEnd(scale=1.0) {
function svgEnd(key, scale = 1.0) {
let width = 48 * scale;
let height = 64 * scale;
return <svg width={width} height={height} xmlns="http://www.w3.org/2000/svg">
return <svg key={key} width={width} height={height} xmlns="http://www.w3.org/2000/svg">
<g>
{ /* vertical line */}
<line y2="0" x2={width/2} y1={height/2} x1={width/2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2="0" x2={width / 2} y1={height / 2} x1={width / 2} strokeWidth="1.5" stroke="#000" fill="none"/>
{ /* horizontal line */}
<line y2={height/2} x2={width} y1={height/2} x1={width/2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2={height / 2} x2={width} y1={height / 2} x1={width / 2} strokeWidth="1.5" stroke="#000"
fill="none"/>
</g>
</svg>;
}
function svgLeft(scale=1.0) {
function svgLeft(key, scale = 1.0) {
let width = 48 * scale;
let height = 64 * scale;
return <svg width={width} height={height} xmlns="http://www.w3.org/2000/svg" style={{}}>
return <svg key={key} width={width} height={height} xmlns="http://www.w3.org/2000/svg">
<g>
{ /* vertical line */}
<line y2="0" x2={width/2} y1={height} x1={width/2} strokeWidth="1.5" stroke="#000" fill="none"/>
<line y2="0" x2={width / 2} y1={height} x1={width / 2} strokeWidth="1.5" stroke="#000" fill="none"/>
</g>
</svg>;
}
function createFileIcon(mimeType, size="2x") {
function createFileIcon(mimeType, size = "2x") {
let icon = "";
if (mimeType !== null) {
if (mimeType) {
mimeType = mimeType.toLowerCase().trim();
let types = ["image", "text", "audio", "video"];
let languages = ["php", "java", "python", "cpp"];
@@ -92,11 +94,11 @@ export function FileBrowser(props) {
icon = "file" + (icon ? ("-" + icon) : icon);
}
return <Icon icon={icon} type={"far"} className={"p-1 align-middle fa-" + size} />
return <Icon icon={icon} type={"far"} className={"p-1 align-middle fa-" + size}/>
}
function formatSize(size) {
const suffixes = ["B","KiB","MiB","GiB","TiB"];
const suffixes = ["B", "KiB", "MiB", "GiB", "TiB"];
let i = 0;
for (; i < suffixes.length && size >= 1024; i++) {
size /= 1024.0;
@@ -109,14 +111,32 @@ export function FileBrowser(props) {
}
}
useEffect(() => {
let newFiles = filesToUpload.slice();
for (let fileIndex = 0; fileIndex < newFiles.length; fileIndex++) {
if (typeof newFiles[fileIndex].progress === 'undefined') {
onUpload(fileIndex);
break;
}
}
}, [filesToUpload]);
function canUpload() {
return api.loggedIn || (tokenObj.valid && tokenObj.type === "upload");
}
function onAddUploadFiles(acceptedFiles) {
let files = filesToUpload.slice();
files.push(...acceptedFiles);
setFilesToUpload(files);
function onAddUploadFiles(acceptedFiles, rejectedFiles) {
if (rejectedFiles && rejectedFiles.length > 0) {
const filenames = rejectedFiles.map(f => f.file.name).join(", ");
pushAlert({msg: "The following files could not be uploaded due to given restrictions: " + filenames }, "Cannot upload file");
}
if (acceptedFiles && acceptedFiles.length > 0) {
let files = filesToUpload.slice();
files.push(...acceptedFiles);
setFilesToUpload(files);
}
}
function getSelectedIds(items = null, recursive = true) {
@@ -158,9 +178,9 @@ export function FileBrowser(props) {
}
}
function createFileList(elements, indentation=0) {
function createFileList(elements, indentation = 0) {
let rows = [];
let i = 0;
let rowIndex = 0;
const scale = 0.45;
const iconSize = "lg";
@@ -168,7 +188,7 @@ export function FileBrowser(props) {
const values = Object.values(elements);
for (const fileElement of values) {
let name = fileElement.name;
let uid = fileElement.uid;
let uid = fileElement.uid;
let type = (fileElement.isDirectory ? "Directory" : fileElement.mimeType);
let size = (fileElement.isDirectory ? "" : formatSize(fileElement.size));
let mimeType = (fileElement.isDirectory ? "application/x-directory" : fileElement.mimeType);
@@ -176,21 +196,21 @@ export function FileBrowser(props) {
let svg = [];
if (indentation > 0) {
for (let i = 0; i < indentation - 1; i++) {
svg.push(svgLeft(scale));
svg.push(svgLeft(rowIndex + "-" + i, scale));
}
if (i === values.length - 1) {
svg.push(svgEnd(scale));
if (rowIndex === values.length - 1) {
svg.push(svgEnd(rowIndex + "-end", scale));
} else {
svg.push(svgMiddle(scale));
svg.push(svgMiddle(rowIndex + "-middle", scale));
}
}
rows.push(
<tr key={"file-" + uid} data-id={uid} className={"file-row"}>
<td>
{ svg }
{ createFileIcon(mimeType, iconSize) }
{svg}
{createFileIcon(mimeType, iconSize)}
</td>
<td>
{fileElement.isDirectory ? name :
@@ -210,156 +230,190 @@ export function FileBrowser(props) {
if (fileElement.isDirectory) {
rows.push(...createFileList(fileElement.items, indentation + 1));
}
i++;
rowIndex++;
}
return rows;
}
let rows = createFileList(files);
let selectedIds = getSelectedIds();
let selectedCount = selectedIds.length;
let uploadZone = <></>;
let writePermissions = canUpload();
let uploadedFiles = [];
let alertElements = [];
let rows = createFileList(files);
let selectedIds = getSelectedIds();
let selectedCount = selectedIds.length;
let uploadZone = <></>;
let writePermissions = canUpload();
let uploadedFiles = [];
let alertElements = [];
for (let i = 0; i < alerts.length; i++) {
const alert = alerts[i];
alertElements.push(
<Alert key={"alert-" + i} {...alert} onClose={() => removeAlert(i)} />
for (let i = 0; i < alerts.length; i++) {
const alert = alerts[i];
alertElements.push(
<Alert key={"alert-" + i} {...alert} onClose={() => removeAlert(i)}/>
);
}
let options = [];
for (const [uid, dir] of Object.entries(directories)) {
options.push(
<option key={"option-" + dir} value={uid}>{dir}</option>
);
}
function getAllowedExtensions() {
let extensions = restrictions.extensions || "";
return extensions.split(",")
.map(ext => ext.trim())
.map(ext => !ext.startsWith(".") && ext.length > 0 ? "." + ext : ext)
.join(",");
}
function getRestrictions() {
return {
accept: getAllowedExtensions(),
maxFiles: restrictions.maxFiles,
maxSize: restrictions.maxSize
};
}
if (writePermissions) {
for (let i = 0; i < filesToUpload.length; i++) {
const file = filesToUpload[i];
const progress = Math.round((file.progress ?? 0) * 100);
const done = progress >= 100;
uploadedFiles.push(
<span className={"uploaded-file"} key={i}>
{createFileIcon(file.type, "3x")}
<span>{file.name}</span>
{!done ?
<div className={"progress border border-primary"}>
<div className={"progress-bar progress-bar-striped progress-bar-animated"} role={"progressbar"}
aria-valuenow={progress} aria-valuemin={"0"} aria-valuemax={"100"}
style={{width: progress + "%"}}>
{ progress + "%" }
</div>
</div> : <></>
}
<Icon icon={done ? "check" : "spinner"} className={"status-icon " + (done ? "text-success" : "text-secondary")} />
</span>
);
}
let options = [];
for (const [uid, dir] of Object.entries(directories)) {
options.push(
<option key={"option-" + dir} value={uid}>{dir}</option>
);
}
if (writePermissions) {
for(let i = 0; i < filesToUpload.length; i++) {
const file = filesToUpload[i];
uploadedFiles.push(
<span className={"uploaded-file"} key={i}>
{ createFileIcon(file.type, "3x") }
<span>{file.name}</span>
<Icon icon={"times"} onClick={(e) => onRemoveUploadedFile(e, i)}/>
</span>
);
}
uploadZone = <><Dropzone onDrop={onAddUploadFiles}>
uploadZone = <>
<div className={"p-3"}>
<label><b>Destination Directory:</b></label>
<select value={popup.directory} className={"form-control"}
onChange={(e) => onPopupChange(e, "directory")}>
{options}
</select>
</div>
<Dropzone onDrop={onAddUploadFiles} {...getRestrictions()} >
{({getRootProps, getInputProps}) => (
<section className={"file-upload-container"}>
<div {...getRootProps()}>
<input {...getInputProps()} />
<p>Drag 'n' drop some files here, or click to select files</p>
{ uploadedFiles.length === 0 ?
{uploadedFiles.length === 0 ?
<Icon className={"mx-auto fa-3x text-black-50"} icon={"upload"}/> :
<div>{uploadedFiles}</div>
}
</div>
</section>
)}
</Dropzone>
</>;
}
return <>
<h4>
<Icon icon={"sync"} className={"mx-3 clickable small"} onClick={fetchFiles}/>
File Browser
</h4>
<table className={"table data-table file-table"}>
<thead>
<tr>
<th/>
<th>Name</th>
<th>Type</th>
<th>Size</th>
<th/>
</tr>
</thead>
<tbody>
{ rows.length > 0 ? rows :
<tr>
<td colSpan={4} className={"text-center text-black-50"}>
No files uploaded yet
</td>
</tr>
}
</tbody>
</table>
<div className={"file-control-buttons"}>
<button type={"button"} className={"btn btn-success"} disabled={selectedCount === 0}
onClick={() => onDownload(selectedIds)}>
<Icon icon={"download"} className={"mr-1"}/>
Download Selected Files ({selectedCount})
</button>
{ api.loggedIn ?
<button type={"button"} className={"btn btn-info"} onClick={(e) => onPopupOpen("createDirectory")}>
<Icon icon={"plus"} className={"mr-1"}/>
Create Directory
</button> :
<></>
}
{
writePermissions ?
<>
<button type={"button"} className={"btn btn-primary"} disabled={uploadedFiles.length === 0}
onClick={(e) => api.loggedIn ? onPopupOpen("upload") : onUpload()}>
<Icon icon={"upload"} className={"mr-1"}/>
Upload
</button>
<button type={"button"} className={"btn btn-danger"} disabled={selectedCount === 0}
onClick={() => deleteFiles(selectedIds)}>
<Icon icon={"trash"} className={"mr-1"}/>
Delete Selected Files ({selectedCount})
</button>
</>
: <></>
}
</div>
{ uploadZone }
<div className={"file-browser-restrictions px-4 mb-4"}>
<b>Restrictions:</b>
<span>Max. Files: { restrictions.maxFiles }</span>
<span>Max. Filesize: { formatSize(restrictions.maxSize) }</span>
<span>{ restrictions.extensions ? "Allowed extensions: " + restrictions.extensions : "All extensions allowed" }</span>
</div>
<div>
{ alertElements }
</div>
<Popup title={"Create Directory"} visible={popup.visible} buttons={["Ok","Cancel"]} onClose={onPopupClose} onClick={onPopupButton}>
<div className={"form-group"}>
<label>Destination Directory:</label>
<select value={popup.directory} className={"form-control"}
onChange={(e) => onPopupChange(e, "directory")}>
{ options }
</select>
</div>
{ popup.type !== "upload" ?
<div className={"form-group"}>
<label>Directory Name</label>
<input type={"text"} className={"form-control"} value={popup.directoryName} maxLength={32} placeholder={"Enter name…"}
onChange={(e) => onPopupChange(e, "directoryName")}/>
</div> : <></>
}
</Popup>
)}
</Dropzone>
</>;
}
return <>
<h4>
<Icon icon={"sync"} className={"mx-3 clickable small"} onClick={fetchFiles}/>
File Browser
</h4>
<table className={"table data-table file-table"}>
<thead>
<tr>
<th/>
<th>Name</th>
<th>Type</th>
<th>Size</th>
<th/>
</tr>
</thead>
<tbody>
{rows.length > 0 ? rows :
<tr>
<td colSpan={4} className={"text-center text-black-50"}>
No files uploaded yet
</td>
</tr>
}
</tbody>
</table>
<div className={"file-control-buttons"}>
<button type={"button"} className={"btn btn-success"} disabled={selectedCount === 0}
onClick={() => onDownload(selectedIds)}>
<Icon icon={"download"} className={"mr-1"}/>
Download Selected Files ({selectedCount})
</button>
<span/>
{
writePermissions ?
<>
<button type={"button"} className={"btn btn-danger"} disabled={selectedCount === 0}
onClick={() => deleteFiles(selectedIds)}>
<Icon icon={"trash"} className={"mr-1"}/>
Delete Selected Files ({selectedCount})
</button>
{api.loggedIn ?
<button type={"button"} className={"btn btn-info"}
onClick={(e) => onPopupOpen("createDirectory")}>
<Icon icon={"plus"} className={"mr-1"}/>
Create Directory
</button> :
<></>
}
</>
: <></>
}
</div>
{uploadZone}
<div className={"file-browser-restrictions px-4 mb-4"}>
<b>Restrictions:</b>
<span>Max. Files: {restrictions.maxFiles}</span>
<span>Max. Filesize: {formatSize(restrictions.maxSize)}</span>
<span>{restrictions.extensions ? "Allowed extensions: " + restrictions.extensions : "All extensions allowed"}</span>
</div>
<div>
{alertElements}
</div>
<Popup title={"Create Directory"} visible={popup.visible} buttons={["Ok", "Cancel"]} onClose={onPopupClose}
onClick={onPopupButton}>
<div className={"form-group"}>
<label>Destination Directory:</label>
<select value={popup.directory} className={"form-control"}
onChange={(e) => onPopupChange(e, "directory")}>
{options}
</select>
</div>
{popup.type !== "upload" ?
<div className={"form-group"}>
<label>Directory Name</label>
<input type={"text"} className={"form-control"} value={popup.directoryName} maxLength={32}
placeholder={"Enter name…"}
onChange={(e) => onPopupChange(e, "directoryName")}/>
</div> : <></>
}
</Popup>
</>;
function onPopupOpen(type) {
setPopup({ ...popup, visible: true, type: type });
setPopup({...popup, visible: true, type: type});
}
function onPopupClose() {
setPopup({ ...popup, visible: false });
setPopup({...popup, visible: false});
}
function onPopupChange(e, key) {
setPopup({ ...popup, [key]: e.target.value });
setPopup({...popup, [key]: e.target.value});
}
function onPopupButton(btn) {
@@ -374,34 +428,40 @@ export function FileBrowser(props) {
fetchFiles();
}
});
} else if (popup.type === "upload") {
onUpload();
}
}
onPopupClose();
}
function fetchFiles() {
if (tokenObj.valid) {
api.validateToken(tokenObj.value).then((res) => {
if (res) {
onFetchFiles(res.files);
} else {
pushAlert(res);
}
});
} else if (api.loggedIn) {
api.listFiles().then((res) => {
if (res) {
onFetchFiles(res.files);
} else {
pushAlert(res);
}
});
function removeUploadedFiles() {
let newFiles = filesToUpload.filter(file => !file.progress || file.progress < 1.0);
if (newFiles.length !== filesToUpload.length) {
setFilesToUpload(newFiles);
}
}
function fetchFiles() {
let promise;
if (tokenObj.valid) {
promise = api.validateToken(tokenObj.value);
} else if (api.loggedIn) {
promise = api.listFiles()
} else {
return; // should never happen
}
promise.then((res) => {
if (res) {
onFetchFiles(res.files);
removeUploadedFiles();
} else {
pushAlert(res);
}
});
}
function onRemoveUploadedFile(e, i) {
e.stopPropagation();
let files = filesToUpload.slice();
@@ -411,7 +471,7 @@ export function FileBrowser(props) {
function pushAlert(res, title) {
let newAlerts = alerts.slice();
newAlerts.push({ type: "danger", message: res.msg, title: title });
newAlerts.push({type: "danger", message: res.msg, title: title});
setAlerts(newAlerts);
}
@@ -427,21 +487,30 @@ export function FileBrowser(props) {
if (selectedIds && selectedIds.length > 0) {
let token = (api.loggedIn ? null : tokenObj.value);
api.delete(selectedIds, token).then((res) => {
if (res.success) {
fetchFiles();
} else {
pushAlert(res);
}
if (res.success) {
fetchFiles();
} else {
pushAlert(res);
}
});
}
}
function onUpload() {
function onUploadProgress(event, fileIndex) {
if (fileIndex < filesToUpload.length) {
let files = filesToUpload.slice();
files[fileIndex].progress = event.loaded >= event.total ? 1 : event.loaded / event.total;
setFilesToUpload(files);
}
}
function onUpload(fileIndex) {
let token = (api.loggedIn ? null : tokenObj.value);
let parentId = ((!api.loggedIn || popup.directory === 0) ? null : popup.directory);
api.upload(filesToUpload, token, parentId).then((res) => {
const file = filesToUpload[fileIndex];
api.upload(file, token, parentId, (e) => onUploadProgress(e, fileIndex)).then((res) => {
if (res.success) {
setFilesToUpload([]);
// setFilesToUpload([]);
fetchFiles();
} else {
pushAlert(res);
+7 -7
View File
@@ -1,11 +1,11 @@
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=486)}([function(e,t,n){"use strict";e.exports=n(271)},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,r){return wt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function y(e){var t=_(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=a.momentProperties=[],g=!1;function M(e,t){var n,r,a;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=h(t)),l(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)l(a=t[r=v[n]])||(e[r]=a);return e}function L(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,a.updateOffset(this),g=!1)}function b(e){return e instanceof L||null!=e&&null!=e._isAMomentObject}function k(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function Y(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){var r,i,o,u=[];for(i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(o in r+="\n["+i+"] ",arguments[0])s(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];u.push(r)}k(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var w,T={};function D(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),T[e]||(k(t),T[e]=!0)}function S(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e,t){var n,r=m({},e);for(n in t)s(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&o(e[n])&&(r[n]=m({},r[n]));return r}function E(e){null!=e&&this.set(e)}function j(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,w=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?Line truncated
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=514)}([function(e,t,n){"use strict";e.exports=n(281)},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,r){return Yt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function y(e){var t=_(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=a.momentProperties=[],g=!1;function M(e,t){var n,r,a;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=h(t)),l(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)l(a=t[r=v[n]])||(e[r]=a);return e}function L(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,a.updateOffset(this),g=!1)}function b(e){return e instanceof L||null!=e&&null!=e._isAMomentObject}function k(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function w(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){var r,i,o,u=[];for(i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(o in r+="\n["+i+"] ",arguments[0])s(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];u.push(r)}k(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var Y,T={};function D(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),T[e]||(k(t),T[e]=!0)}function S(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e,t){var n,r=m({},e);for(n in t)s(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&o(e[n])&&(r[n]=m({},r[n]));return r}function E(e){null!=e&&this.set(e)}function j(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,Y=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?Line truncated
//! moment.js
a.version="2.29.1",t=Tt,a.fn=yn,a.min=function(){var e=[].slice.call(arguments,0);return xt("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return xt("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=_,a.unix=function(e){return Tt(1e3*e)},a.months=function(e,t){return Ln(e,t,"months")},a.isDate=c,a.locale=ot,a.invalid=y,a.duration=It,a.isMoment=b,a.weekdays=function(e,t,n){return bn(e,t,n,"weekdays")},a.parseZone=function(){return Tt.apply(null,arguments).parseZone()},a.localeData=ut,a.isDuration=Ht,a.monthsShort=function(e,t){return Ln(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return bn(e,t,n,"weekdaysMin")},a.defineLocale=st,a.updateLocale=function(e,t){if(null!=t){var n,r,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(x(tt[e]._config,t)):(null!=(r=it(e))&&(a=r._config),t=x(a,t),null==r&&(t.abbr=e),(n=new E(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return w(tt)},a.weekdaysShort=function(e,t,n){return bn(e,t,n,"weekdaysShort")},a.normalizeUnits=z,a.relativeTimeRounding=function(e){return void 0===e?Bn:"function"==typeof e&&(Bn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=yn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(484)(e))},function(e,t,n){var r=n(5),a=n(21),i=n(14),o=n(15),s=n(22),u=function(e,t,n){var l,d,c,f,m=e&u.F,_=e&u.G,h=e&u.S,p=e&u.P,y=e&u.B,v=_?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,g=_?a:a[t]||(a[t]={}),M=g.prototype||(g.prototype={});for(l in _&&(n=t),n)c=((d=!m&&v&&void 0!==v[l])?v:n)[l],f=y&&d?s(c,r):p&&"function"==typeof c?s(Function.call,c):c,v&&o(v,l,c,e&u.U),g[l]!=c&&i(g,l,f),p&&M[l]!=c&&(M[l]=c)};r.core=a,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){e.exports=n(482)()},function(e,t,n){var r=n(7);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(50)("wks"),a=n(36),i=n(5).Symbol,o="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=r},function(e,t,n){var r=n(24),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t,n){e.exports=!n(6)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),a=n(98),i=n(26),o=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),a)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(27);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(11),a=n(35);e.exports=n(10)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),a=n(14),i=n(17),o=n(36)("src"),s=n(278),u=(""+s).split("toString");n(21).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(i(n,o)||a(n,o,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(2),a=n(6),i=n(27),o=/"/g,s=function(e,t,n,r){var a=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,"&quot;")+'"'),s+">"+a+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*a((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(51),a=n(27);e.exports=function(e){return r(a(e))}},function(e,t,n){var r=n(52),a=n(35),i=n(18),o=n(26),s=n(17),u=n(98),l=Object.getOwnPropertyDescriptor;t.f=n(10)?l:function(e,t){if(e=i(e),t=o(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(17),a=n(12),i=n(71)("IE_PROTO"),o=Object.proLine truncated
a.version="2.29.1",t=Tt,a.fn=yn,a.min=function(){var e=[].slice.call(arguments,0);return xt("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return xt("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=_,a.unix=function(e){return Tt(1e3*e)},a.months=function(e,t){return Ln(e,t,"months")},a.isDate=c,a.locale=ot,a.invalid=y,a.duration=It,a.isMoment=b,a.weekdays=function(e,t,n){return bn(e,t,n,"weekdays")},a.parseZone=function(){return Tt.apply(null,arguments).parseZone()},a.localeData=ut,a.isDuration=Ot,a.monthsShort=function(e,t){return Ln(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return bn(e,t,n,"weekdaysMin")},a.defineLocale=st,a.updateLocale=function(e,t){if(null!=t){var n,r,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(x(tt[e]._config,t)):(null!=(r=it(e))&&(a=r._config),t=x(a,t),null==r&&(t.abbr=e),(n=new E(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return Y(tt)},a.weekdaysShort=function(e,t,n){return bn(e,t,n,"weekdaysShort")},a.normalizeUnits=z,a.relativeTimeRounding=function(e){return void 0===e?Vn:"function"==typeof e&&(Vn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=yn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(512)(e))},function(e,t,n){var r=n(5),a=n(22),i=n(14),o=n(15),s=n(23),u=function(e,t,n){var l,d,c,f,m=e&u.F,_=e&u.G,h=e&u.S,p=e&u.P,y=e&u.B,v=_?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,g=_?a:a[t]||(a[t]={}),M=g.prototype||(g.prototype={});for(l in _&&(n=t),n)c=((d=!m&&v&&void 0!==v[l])?v:n)[l],f=y&&d?s(c,r):p&&"function"==typeof c?s(Function.call,c):c,v&&o(v,l,c,e&u.U),g[l]!=c&&i(g,l,f),p&&M[l]!=c&&(M[l]=c)};r.core=a,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){e.exports=n(510)()},function(e,t,n){var r=n(7);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(51)("wks"),a=n(37),i=n(5).Symbol,o="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=r},function(e,t,n){var r=n(25),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t,n){e.exports=!n(6)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),a=n(100),i=n(27),o=Object.defineProperty;t.f=n(10)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),a)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(28);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(11),a=n(36);e.exports=n(10)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),a=n(14),i=n(18),o=n(37)("src"),s=n(288),u=(""+s).split("toString");n(22).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(i(n,o)||a(n,o,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(2),a=n(6),i=n(28),o=/"/g,s=function(e,t,n,r){var a=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,"&quot;")+'"'),s+">"+a+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*a((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){"use strict";var r=n(136),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===a.call(e)}function d(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(Line truncated
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=o(e),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))a.call(n,d)&&(u[d]=n[d]);if(r){s=r(n);for(var c=0;c<s.length;c++)i.call(n,s[c])&&(u[s[c]]=n[s[c]])}}return u}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(10)&&!n(6)((function(){return 7!=Object.defineProperty(n(69)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(17),a=n(18),i=n(55)(!1),o=n(71)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),u=0,l=[];for(n in s)n!=o&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(11),a=n(4),i=n(37);e.exports=n(10)?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),s=o.length,u=0;s>u;)r.f(e,n=o[u++],t[n]);return e}},function(e,t,n){var r=n(18),a=n(40).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(r(e))}},function(e,t,n){"use strict";var r=n(10),a=n(37),i=n(56),o=n(52),s=n(12),u=n(51),l=Object.assign;e.exports=!l||n(6)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,d=1,c=i.f,f=o.f;l>d;)for(var m,_=u(arguments[d++]),h=c?a(_).concat(c(_)):a(_),p=h.length,y=0;p>y;)m=h[y++],r&&!f.call(_,m)||(n[m]=_[m]);return n}:l},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(13),a=n(7),i=n(106),o=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],a=0;a<t;a++)r[a]="a["+a+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),s=function(){var r=n.concat(o.call(arguments));return this instanceof s?u(t,r.length,r):i(t,r,e)};return a(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(5).parseInt,a=n(48).trim,i=n(75),o=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=a(String(e),3);return r(n,t>>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(5).parseFloat,a=n(48).trim;e.exports=1/r(n(75)+"-0")!=-1/0?function(e){var t=a(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(23);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(7),a=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&a(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(78),a=Math.pow,i=a(2,-52),o=a(2,-23),s=a(2,127)*(2-o),u=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=Math.abs(e),l=r(e);return a<u?l*(a/u/o+1/i-1/i)*u*o:(n=(t=(1+o/i)*a)-(t-a))>s||n!=n?l*(1/0):l*n}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(13),a=n(12),i=n(51),o=n(9);e.exports=function(e,t,n,s,u){r(t);var l=a(e),d=i(l),c=o(l.length),f=u?c-1:0,m=u?-1:1;if(n<2)for(;;){if(f in d){s=d[f],f+=m;break}if(f+=m,u?f<0:c<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:c>f;f+=m)f in d&&(s=t(s,d[f],f,l));return s}},function(e,t,n){"use strict";var r=n(12),a=n(38),i=n(9);e.exports=[].copyWithin||function(e,t){var n=r(this),o=i(n.length),s=a(e,o),u=a(t,o),l=arguments.length>2?arguments[2]:void 0,d=Math.min((void 0===l?o:a(l,o))-u,o-s),c=1;for(u<s&&s<u+d&&(c=-1,u+=d-1,s+=d-1);d-- >0;)u in n?n[s]=n[u]:delete n[s],s+=c,u+=c;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!Line truncated
*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=o(e),l=1;l<arguments.length;l++){for(var d in n=Object(arguments[l]))a.call(n,d)&&(u[d]=n[d]);if(r){s=r(n);for(var c=0;c<s.length;c++)i.call(n,s[c])&&(u[s[c]]=n[s[c]])}}return u}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(10)&&!n(6)((function(){return 7!=Object.defineProperty(n(71)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(18),a=n(19),i=n(56)(!1),o=n(73)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),u=0,l=[];for(n in s)n!=o&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(11),a=n(4),i=n(38);e.exports=n(10)?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),s=o.length,u=0;s>u;)r.f(e,n=o[u++],t[n]);return e}},function(e,t,n){var r=n(19),a=n(41).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==i.call(e)?function(e){try{return a(e)}catch(e){return o.slice()}}(e):a(r(e))}},function(e,t,n){"use strict";var r=n(10),a=n(38),i=n(57),o=n(53),s=n(12),u=n(52),l=Object.assign;e.exports=!l||n(6)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,d=1,c=i.f,f=o.f;l>d;)for(var m,_=u(arguments[d++]),h=c?a(_).concat(c(_)):a(_),p=h.length,y=0;p>y;)m=h[y++],r&&!f.call(_,m)||(n[m]=_[m]);return n}:l},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(13),a=n(7),i=n(108),o=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],a=0;a<t;a++)r[a]="a["+a+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),s=function(){var r=n.concat(o.call(arguments));return this instanceof s?u(t,r.length,r):i(t,r,e)};return a(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(5).parseInt,a=n(49).trim,i=n(77),o=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=a(String(e),3);return r(n,t>>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(5).parseFloat,a=n(49).trim;e.exports=1/r(n(77)+"-0")!=-1/0?function(e){var t=a(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(24);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(7),a=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&a(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(80),a=Math.pow,i=a(2,-52),o=a(2,-23),s=a(2,127)*(2-o),u=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=Math.abs(e),l=r(e);return a<u?l*(a/u/o+1/i-1/i)*u*o:(n=(t=(1+o/i)*a)-(t-a))>s||n!=n?l*(1/0):l*n}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(13),a=n(12),i=n(52),o=n(9);e.exports=function(e,t,n,s,u){r(t);var l=a(e),d=i(l),c=o(l.length),f=u?c-1:0,m=u?-1:1;if(n<2)for(;;){if(f in d){s=d[f],f+=m;break}if(f+=m,u?f<0:c<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:c>f;f+=m)f in d&&(s=t(s,d[f],f,l));return s}},function(e,t,n){"use strict";var r=n(12),a=n(39),i=n(9);e.exports=[].copyWithin||function(e,t){var n=r(this),o=i(n.length),s=a(e,o),u=a(t,o),l=arguments.length>2?arguments[2]:void 0,d=Math.min((void 0===l?o:a(l,o))-u,o-s),c=1;for(u<s&&s<u+d&&(c=-1,u+=d-1,s+=d-1);d-- >0;)u in n?n[s]=n[u]:delete n[s],s+=c,u+=c;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!Line truncated
//! moment.js locale configuration
e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(1))},function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
@@ -275,7 +275,7 @@ e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月
//! moment.js locale configuration
e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(272)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=(e.type||"").toLowerCase(),i=a.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):a===t}))}return!0}},function(e,t,n){"use strict";
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(1))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(282)},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=(e.type||"").toLowerCase(),i=a.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):a===t}))}return!0}},function(e,t,n){"use strict";
/** @license React v16.14.0
* react.production.min.js
*
@@ -283,7 +283,7 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(96),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,u=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,d=a?Symbol.for("react.provider"):60109,c=a?Symbol.for("react.context"):60110,f=a?Symbol.for("react.forward_ref"):60112,m=a?Symbol.for("react.suspense"):60113,_=a?Symbol.for("react.memo"):60115,h=a?Symbol.for("react.lazy"):60116,p="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function M(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}function L(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}M.prototype.isReactComponent={},M.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},M.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},L.prototype=M.prototype;var k=b.prototype=new L;k.constructor=b,r(k,M.prototype),k.isPureReactComponent=!0;var Y={current:null},w=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,a={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];a.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===a[r]&&(a[r]=u[r]);return{$$typeof:i,type:e,key:o,ref:s,props:a,_owner:Y.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var x=/\/+/g,E=[];function j(e,t,n,r){if(E.length){var a=E.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function H(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>E.length&&E.push(e)}function O(e,t,n){return null==e?0:function e(t,n,r,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return r(a,t,""===n?"."+P(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var d=n+P(s=t[l],l);u+=e(s,d,r,a)}else if(null===t||"object"!=typeof t?d=null:d="function"==typeof(d=p&&t[p]||t["@@iterator"])?d:null,"function"==typeof d)for(t=d.call(t),l=0;!(s=t.next()).done;)u+=e(s=s.value,d=n+P(s,l++),r,a);else if("object"===s)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function F(e,t){e.func.call(e.context,t,e.count++)}function A(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?C(e,r,n,(function(e){return e})):null!=e&&(S(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function C(e,t,n,r,a){var i="";null!=n&&(i=(""+n).replace(x,"$&/")+"/"),O(e,A,t=j(t,i,r,a)),H(t)}var N={current:null};function W(){var e=N.current;if(null===e)throw Error(y(321));return e}var R={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:Y,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return C(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;O(e,F,t=j(null,null,t,n)),H(t)},count:function(e){return O(e,(function(){return null}),null)},toArray:function(e){var t=[];return C(e,t,null,(function(e){return e})),t},only:function(e){if(!S(e))throw Error(y(143));return e}},t.Component=M,t.Fragment=s,t.Profiler=l,t.PureComponent=b,t.StrictMode=u,t.Suspense=m,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var a=r({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=Y.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(d in t)w.call(t,d)&&!T.hasOwnProperty(d)&&(a[d]=void 0===t[d]&&void 0!==l?l[d]:t[d])}var d=arguments.length-2;if(1===d)a.children=n;else if(1<d){l=Array(d);for(var c=0;c<d;c++)l[c]=arguments[c+2];a.children=l}return{$$typeof:i,tyLine truncated
*/var r=n(98),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,u=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,d=a?Symbol.for("react.provider"):60109,c=a?Symbol.for("react.context"):60110,f=a?Symbol.for("react.forward_ref"):60112,m=a?Symbol.for("react.suspense"):60113,_=a?Symbol.for("react.memo"):60115,h=a?Symbol.for("react.lazy"):60116,p="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function M(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}function L(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}M.prototype.isReactComponent={},M.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},M.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},L.prototype=M.prototype;var k=b.prototype=new L;k.constructor=b,r(k,M.prototype),k.isPureReactComponent=!0;var w={current:null},Y=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,a={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)Y.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];a.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===a[r]&&(a[r]=u[r]);return{$$typeof:i,type:e,key:o,ref:s,props:a,_owner:w.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var x=/\/+/g,E=[];function j(e,t,n,r){if(E.length){var a=E.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function O(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>E.length&&E.push(e)}function H(e,t,n){return null==e?0:function e(t,n,r,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return r(a,t,""===n?"."+P(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var d=n+P(s=t[l],l);u+=e(s,d,r,a)}else if(null===t||"object"!=typeof t?d=null:d="function"==typeof(d=p&&t[p]||t["@@iterator"])?d:null,"function"==typeof d)for(t=d.call(t),l=0;!(s=t.next()).done;)u+=e(s=s.value,d=n+P(s,l++),r,a);else if("object"===s)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function A(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?C(e,r,n,(function(e){return e})):null!=e&&(S(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(x,"$&/")+"/")+n)),r.push(e))}function C(e,t,n,r,a){var i="";null!=n&&(i=(""+n).replace(x,"$&/")+"/"),H(e,F,t=j(t,i,r,a)),O(t)}var N={current:null};function W(){var e=N.current;if(null===e)throw Error(y(321));return e}var R={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return C(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;H(e,A,t=j(null,null,t,n)),O(t)},count:function(e){return H(e,(function(){return null}),null)},toArray:function(e){var t=[];return C(e,t,null,(function(e){return e})),t},only:function(e){if(!S(e))throw Error(y(143));return e}},t.Component=M,t.Fragment=s,t.Profiler=l,t.PureComponent=b,t.StrictMode=u,t.Suspense=m,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var a=r({},e.props),o=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=w.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(d in t)Y.call(t,d)&&!T.hasOwnProperty(d)&&(a[d]=void 0===t[d]&&void 0!==l?l[d]:t[d])}var d=arguments.length-2;if(1===d)a.children=n;else if(1<d){l=Array(d);for(var c=0;c<d;c++)l[c]=arguments[c+2];a.children=l}return{$$typeof:i,tyLine truncated
/** @license React v16.14.0
* react-dom.production.min.js
*
@@ -291,7 +291,7 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(0),a=n(96),i=n(273);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));function s(e,t,n,r,a,i,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var u=!1,l=null,d=!1,c=null,f={onError:function(e){u=!0,l=e}};function m(e,t,n,r,a,i,o,d,c){u=!1,l=null,s.apply(f,arguments)}var _=null,h=null,p=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=p(n),function(e,t,n,r,a,i,s,f,_){if(m.apply(this,arguments),u){if(!u)throw Error(o(198));var h=l;u=!1,l=null,d||(d=!0,c=h)}}(r,t,void 0,e),e.currentTarget=null}var v=null,g={};function M(){if(v)for(var e in g){var t=g[e],n=v.indexOf(e);if(!(-1<n))throw Error(o(96,e));if(!b[n]){if(!t.extractEvents)throw Error(o(97,e));for(var r in b[n]=t,n=t.eventTypes){var a=void 0,i=n[r],s=t,u=r;if(k.hasOwnProperty(u))throw Error(o(99,u));k[u]=i;var l=i.phasedRegistrationNames;if(l){for(a in l)l.hasOwnProperty(a)&&L(l[a],s,u);a=!0}else i.registrationName?(L(i.registrationName,s,u),a=!0):a=!1;if(!a)throw Error(o(98,r,e))}}}}function L(e,t,n){if(Y[e])throw Error(o(100,e));Y[e]=t,w[e]=t.eventTypes[n].dependencies}var b=[],k={},Y={},w={};function T(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!g.hasOwnProperty(t)||g[t]!==r){if(g[t])throw Error(o(102,t));g[t]=r,n=!0}}n&&M()}var D=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),S=null,x=null,E=null;function j(e){if(e=h(e)){if("function"!=typeof S)throw Error(o(280));var t=e.stateNode;t&&(t=_(t),S(e.stateNode,e.type,t))}}function H(e){x?E?E.push(e):E=[e]:x=e}function O(){if(x){var e=x,t=E;if(E=x=null,j(e),t)for(e=0;e<t.length;e++)j(t[e])}}function P(e,t){return e(t)}function F(e,t,n,r,a){return e(t,n,r,a)}function A(){}var C=P,N=!1,W=!1;function R(){null===x&&null===E||(A(),O())}function z(e,t,n){if(W)return e(t,n);W=!0;try{return C(e,t,n)}finally{W=!1,R()}}var I=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,U=Object.prototype.hasOwnProperty,J={},V={};function B(e,t,n,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){G[e]=new B(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];G[t]=new B(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){G[e]=new B(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){G[e]=new B(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){G[e]=new B(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){G[e]=new B(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){G[e]=new B(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){G[e]=new B(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){G[e]=new B(e,5,!1,e.toLowerCase(),null,!1)}));var $=/[\-:]([a-z])/g;function K(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-raLine truncated
*/var r=n(0),a=n(98),i=n(283);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));function s(e,t,n,r,a,i,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var u=!1,l=null,d=!1,c=null,f={onError:function(e){u=!0,l=e}};function m(e,t,n,r,a,i,o,d,c){u=!1,l=null,s.apply(f,arguments)}var _=null,h=null,p=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=p(n),function(e,t,n,r,a,i,s,f,_){if(m.apply(this,arguments),u){if(!u)throw Error(o(198));var h=l;u=!1,l=null,d||(d=!0,c=h)}}(r,t,void 0,e),e.currentTarget=null}var v=null,g={};function M(){if(v)for(var e in g){var t=g[e],n=v.indexOf(e);if(!(-1<n))throw Error(o(96,e));if(!b[n]){if(!t.extractEvents)throw Error(o(97,e));for(var r in b[n]=t,n=t.eventTypes){var a=void 0,i=n[r],s=t,u=r;if(k.hasOwnProperty(u))throw Error(o(99,u));k[u]=i;var l=i.phasedRegistrationNames;if(l){for(a in l)l.hasOwnProperty(a)&&L(l[a],s,u);a=!0}else i.registrationName?(L(i.registrationName,s,u),a=!0):a=!1;if(!a)throw Error(o(98,r,e))}}}}function L(e,t,n){if(w[e])throw Error(o(100,e));w[e]=t,Y[e]=t.eventTypes[n].dependencies}var b=[],k={},w={},Y={};function T(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!g.hasOwnProperty(t)||g[t]!==r){if(g[t])throw Error(o(102,t));g[t]=r,n=!0}}n&&M()}var D=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),S=null,x=null,E=null;function j(e){if(e=h(e)){if("function"!=typeof S)throw Error(o(280));var t=e.stateNode;t&&(t=_(t),S(e.stateNode,e.type,t))}}function O(e){x?E?E.push(e):E=[e]:x=e}function H(){if(x){var e=x,t=E;if(E=x=null,j(e),t)for(e=0;e<t.length;e++)j(t[e])}}function P(e,t){return e(t)}function A(e,t,n,r,a){return e(t,n,r,a)}function F(){}var C=P,N=!1,W=!1;function R(){null===x&&null===E||(F(),H())}function z(e,t,n){if(W)return e(t,n);W=!0;try{return C(e,t,n)}finally{W=!1,R()}}var I=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,U=Object.prototype.hasOwnProperty,J={},B={};function V(e,t,n,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){G[e]=new V(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];G[t]=new V(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){G[e]=new V(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){G[e]=new V(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){G[e]=new V(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){G[e]=new V(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){G[e]=new V(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){G[e]=new V(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){G[e]=new V(e,5,!1,e.toLowerCase(),null,!1)}));var $=/[\-:]([a-z])/g;function q(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-raLine truncated
/** @license React v0.19.1
* scheduler.production.min.js
*
@@ -299,4 +299,4 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,m=window.Date,_=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=m.now();t.unstable_now=function(){return m.now()-y}}var v=!1,g=null,M=-1,L=5,b=0;o=function(){return t.unstable_now()>=b},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):L=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,Y=k.port2;k.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+L;try{g(!0,e)?Y.postMessage(null):(v=!1,g=null)}catch(e){throw Y.postMessage(null),e}}else v=!1},r=function(e){g=e,v||(v=!0,Y.postMessage(null))},a=function(e,n){M=_((function(){e(t.unstable_now())}),n)},i=function(){h(M),M=-1}}function w(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<S(a,t)))break e;e[r]=t,e[n]=a,n=r}}function T(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var i=2*(r+1)-1,o=e[i],s=i+1,u=e[s];if(void 0!==o&&0>S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],E=[],j=1,H=null,O=3,P=!1,F=!1,A=!1;function C(e){for(var t=T(E);null!==t;){if(null===t.callback)D(E);else{if(!(t.startTime<=e))break;D(E),t.sortIndex=t.expirationTime,w(x,t)}t=T(E)}}function N(e){if(A=!1,C(e),!F)if(null!==T(x))F=!0,r(W);else{var t=T(E);null!==t&&a(N,t.startTime-e)}}function W(e,n){F=!1,A&&(A=!1,i()),P=!0;var r=O;try{for(C(n),H=T(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===T(x)&&D(x),C(n)}else D(x);H=T(x)}if(null!==H)var l=!0;else{var d=T(E);null!==d&&a(N,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function R(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||P||(F=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?s+u:s,o="number"==typeof o.timeout?o.timeout:R(e)}else o=R(e),u=s;return e={id:j++,callback:n,priorityLevel:e,startTime:u,expirationTime:o=u+o,sortIndex:-1},u>s?(e.sortIndex=u,w(E,e),null===T(x)&&e===T(E)&&(A?i():A=!0,a(N,u-s))):(e.sortIndex=o,w(x,e),F||P||(F=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();C(e);var n=T(x);return n!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<H.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=O;return function(){var n=O;O=t;try{return e.apply(this,arguments)}finally{O=n}}}},function(e,t,n){"use strict";(function(e){if(n(276),n(473),n(474),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function t(e,t,n){e[t]||Object.defineProperty(e,t,{writable:!0,configurable:!0,value:n})}t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter, Line truncated
*/var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,m=window.Date,_=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=m.now();t.unstable_now=function(){return m.now()-y}}var v=!1,g=null,M=-1,L=5,b=0;o=function(){return t.unstable_now()>=b},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):L=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,w=k.port2;k.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+L;try{g(!0,e)?w.postMessage(null):(v=!1,g=null)}catch(e){throw w.postMessage(null),e}}else v=!1},r=function(e){g=e,v||(v=!0,w.postMessage(null))},a=function(e,n){M=_((function(){e(t.unstable_now())}),n)},i=function(){h(M),M=-1}}function Y(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<S(a,t)))break e;e[r]=t,e[n]=a,n=r}}function T(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var i=2*(r+1)-1,o=e[i],s=i+1,u=e[s];if(void 0!==o&&0>S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],E=[],j=1,O=null,H=3,P=!1,A=!1,F=!1;function C(e){for(var t=T(E);null!==t;){if(null===t.callback)D(E);else{if(!(t.startTime<=e))break;D(E),t.sortIndex=t.expirationTime,Y(x,t)}t=T(E)}}function N(e){if(F=!1,C(e),!A)if(null!==T(x))A=!0,r(W);else{var t=T(E);null!==t&&a(N,t.startTime-e)}}function W(e,n){A=!1,F&&(F=!1,i()),P=!0;var r=H;try{for(C(n),O=T(x);null!==O&&(!(O.expirationTime>n)||e&&!o());){var s=O.callback;if(null!==s){O.callback=null,H=O.priorityLevel;var u=s(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?O.callback=u:O===T(x)&&D(x),C(n)}else D(x);O=T(x)}if(null!==O)var l=!0;else{var d=T(E);null!==d&&a(N,d.startTime-n),l=!1}return l}finally{O=null,H=r,P=!1}}function R(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||P||(A=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return H},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(H){case 1:case 2:case 3:var t=3;break;default:t=H}var n=H;H=t;try{return e()}finally{H=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=H;H=e;try{return t()}finally{H=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?s+u:s,o="number"==typeof o.timeout?o.timeout:R(e)}else o=R(e),u=s;return e={id:j++,callback:n,priorityLevel:e,startTime:u,expirationTime:o=u+o,sortIndex:-1},u>s?(e.sortIndex=u,Y(E,e),null===T(x)&&e===T(E)&&(F?i():F=!0,a(N,u-s))):(e.sortIndex=o,Y(x,e),A||P||(A=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();C(e);var n=T(x);return n!==O&&null!==O&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<O.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=H;return function(){var n=H;H=t;try{return e.apply(this,arguments)}finally{H=n}}}},function(e,t,n){"use strict";(function(e){if(n(286),n(483),n(484),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function t(e,t,n){e[t]||Object.defineProperty(e,t,{writable:!0,configurable:!0,value:n})}t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter, Line truncated