From 42d2a3d9194f2a67b30d3941c910624e5fed0598 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 31 Mar 2021 16:02:29 +0200 Subject: [PATCH] Rename + list files bugfix --- core/Api/FileAPI.class.php | 233 ++++++++++++++++-- fileControlPanel/src/api.js | 8 + fileControlPanel/src/elements/file-browser.js | 133 +++++++--- fileControlPanel/src/index.js | 4 +- js/files.min.js | 2 +- 5 files changed, 325 insertions(+), 55 deletions(-) diff --git a/core/Api/FileAPI.class.php b/core/Api/FileAPI.class.php index 91f6908..c63ce26 100644 --- a/core/Api/FileAPI.class.php +++ b/core/Api/FileAPI.class.php @@ -111,26 +111,65 @@ namespace Api { } } + private function insert(&$files, $row) { + $entry = array("uid" => $row["uid"], "name" => $row["name"], "isDirectory" => $row["directory"]); + if ($row["directory"]) { + $entry["items"] = array(); + } else { + $entry["size"] = @filesize($row["path"]); + $entry["mimeType"] = @mime_content_type($row["path"]); + } + + $dir =& $this->findDirectory($files, $row["parentId"]); + if ($dir !== $files || $row["parentId"] === null) { + $dir[$row["uid"]] = $entry; + return true; + } + + return false; + } + protected function createFileList($res) { + $files = array(); + + // Create temporary files + $tempFiles = []; foreach ($res as $row) { - if ($row["uid"] === null) continue; $fileId = $row["uid"]; $parentId = $row["parentId"]; - $fileName = $row["name"]; - $isDirectory = $row["directory"]; - $fileElement = array("uid" => $fileId, "name" => $fileName, "isDirectory" => $isDirectory); - if ($isDirectory) { - $fileElement["items"] = array(); - } else { - $fileElement["size"] = @filesize($row["path"]); - $fileElement["mimeType"] = @mime_content_type($row["path"]); + if ($fileId === null) { + continue; } - $dir =& $this->findDirectory($files, $parentId); - $dir[$fileId] = $fileElement; - unset($dir); + // insert all files/dirs in the root directory + if ($parentId === null) { + $this->insert($files, $row); + } else { + // save other files temporary + $tempFiles[$fileId] = $row; + } } + + // repeatedly try to find the directory + // a bit ugly code over here.. + $filesToProcess = count($tempFiles); + while (count($tempFiles) > 0) { + + foreacH($tempFiles as $fileId => $row) { + if ($this->insert($files, $row)) { + unset($tempFiles[$fileId]); + } + } + + // some files could not be inserted for some reason + if (count($tempFiles) === $filesToProcess) { + break; + } else { + $filesToProcess = count($tempFiles); + } + } + return $files; } @@ -434,9 +473,175 @@ namespace Api\File { } } - class Rename extends FileAPI { } + class Rename extends FileAPI { + public function __construct(User $user, bool $externalCall = false) { + parent::__construct($user, $externalCall, array( + "id" => new Parameter("id", Parameter::TYPE_INT), + "name" => new StringType("name", 64, false), + "token" => new StringType("token", 36, true, null) + )); + } - class Move extends FileAPI { } + public function execute($values = array()) { + if (!parent::execute($values)) { + return false; + } + + $fileId = $this->getParam("id"); + $newName = $this->getParam("name"); + $token = $this->getParam("token"); + + if (!$this->user->isLoggedIn() && is_null($token)) { + return $this->createError("Permission denied (expected token)"); + } + + $sql = $this->user->getSQL(); + + $selectColumns = ($token !== null ? array("parent_id", "user_id") : array("parent_id")); + $query = $sql->select(...$selectColumns)->from("UserFile"); + $this->filterFiles($sql, $query, $fileId, $token); + $res = $query->execute(); + + $this->success = $res !== false; + $this->lastError = $sql->getLastError(); + if (!$this->success) { + return false; + } else if (empty($res)) { + return $this->createError("File not found"); + } + + // check if file already exists + $parentId = $res[0]["parent_id"]; + $userId = ($token === null) ? $this->user->getId() : $res[0]["user_id"]; + $res = $sql->select($sql->count()) + ->from("UserFile") + ->where(new Compare("name", $newName)) + ->where(new Compare("parent_id", $parentId)) + ->where(new Compare("user_id", $userId)) + ->execute(); + + $this->success = $res !== false; + $this->lastError = $sql->getLastError(); + if (!$this->success) { + return false; + } else if ($res[0]["count"] > 0) { + return $this->createError("A file or directory with this name does already exist"); + } + + $res = $sql->update("UserFile") + ->set("name", $newName) + ->where(new Compare("parent_id", $parentId)) + ->where(new Compare("user_id", $userId)) + ->where(new Compare("uid", $fileId)) + ->execute(); + + $this->success = $res !== false; + $this->lastError = $sql->getLastError(); + return $this->success; + } + } + + class Move extends FileAPI { + + public function __construct(User $user, bool $externalCall = false) { + parent::__construct($user, $externalCall, array( + 'parentId' => new Parameter('parentId', Parameter::TYPE_INT, true, null), + "id" => new ArrayType("id", Parameter::TYPE_INT, true), + )); + $this->loginRequired = true; + } + + public function execute($values = array()) { + if (!parent::execute($values)) { + return false; + } + + $sql = $this->user->getSQL(); + $fileIds = array_unique($this->getParam("id")); + $destinationId = $this->getParam("parentId"); + $userId = $this->user->getId(); + + // check, if we are trying to do some illegal move + if ($destinationId !== null && in_array($destinationId, $fileIds)) { + return $this->createError("Cannot move a file to the given directory"); + } + + $query = $sql->select("UserFile.uid", "directory", "name", "parent_id")->from("UserFile"); + $this->filterFiles($sql, $query, array_merge($fileIds, [$destinationId])); + $query->orderBy("parent_id")->ascending(); + + $res = $query->execute(); + $this->success = ($res !== false); + $this->lastError = $sql->getLastError(); + if (!$this->success) { + return false; + } + + $foundFiles = array(); + $moveFiles = array(); + $skipDirectories = array(); + + foreach($res as $row) { + $fileId = $row["uid"]; + $isDirectory = $row["directory"]; + $fileName = $row["name"]; + $filesDirectory = $row["parent_id"]; + if ($fileId === $destinationId) { + if (!$isDirectory) { + return $this->createError("Cannot move file: Destination is not a directory"); + } + } else { + $foundFiles[] = $fileId; + + if ($filesDirectory === null || !in_array($filesDirectory, $skipDirectories)) { + $moveFiles[$fileId] = $fileName; + } + + if ($isDirectory) { + $skipDirectories[] = $fileId; + } + } + } + + if (count($foundFiles) !== count($fileIds)) { + foreach ($fileIds as $fileId) { + if (!array_key_exists($fileId, $foundFiles)) { + return $this->createError("File not found: $fileId"); + } + } + } + + // check for duplicates + $res = $sql->select($sql->count()) + ->from("UserFile") + ->where(new Compare("user_id", $userId)) + ->where(new Compare("parent_id", $destinationId)) + ->where(new CondIn("name", array_values($moveFiles))) + ->execute(); + + $this->success = $res !== false; + $this->lastError = $sql->getLastError(); + if (!$this->success) { + return false; + } else if($res[0]["count"] > 0) { + return $this->createError("Cannot move files: the destination directory already contains one or " . + "more files or directories with the same name"); + } + + // update parent ids + $res = $sql->update("UserFile") + ->set("parent_id", $destinationId) + ->where(new Compare("user_id", $userId)) + ->where(new CondIn("uid", array_keys($moveFiles))) + ->execute(); + + $this->success = $res !== false; + $this->lastError = $sql->getLastError(); + + return $this->success; + } + + } class Upload extends FileAPI { diff --git a/fileControlPanel/src/api.js b/fileControlPanel/src/api.js index e12a5c0..078eaa4 100644 --- a/fileControlPanel/src/api.js +++ b/fileControlPanel/src/api.js @@ -64,6 +64,14 @@ export default class API { return this.apiCall("file/createDirectory", { name: name, parentId: parentId }); } + moveFiles(files, parentId = null) { + return this.apiCall("file/move", { id: files, parentId: parentId }); + } + + rename(id, name, token = null) { + return this.apiCall("file/rename", { id: id, name: name, token: token }); + } + getRestrictions() { return this.apiCall("file/getRestrictions"); } diff --git a/fileControlPanel/src/elements/file-browser.js b/fileControlPanel/src/elements/file-browser.js index ce97613..231eeb9 100644 --- a/fileControlPanel/src/elements/file-browser.js +++ b/fileControlPanel/src/elements/file-browser.js @@ -17,10 +17,14 @@ export function FileBrowser(props) { 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 [popup, setPopup] = useState({ visible: false, name: "", directory: 0, target: null, type: "createDirectory" }); let [alerts, setAlerts] = useState([]); let [filesToUpload, setFilesToUpload] = useState([]); + function canUpload() { + return api.loggedIn || (tokenObj.valid && tokenObj.type === "upload"); + } + function svgMiddle(key, scale = 1.0) { let width = 48 * scale; let height = 64 * scale; @@ -122,10 +126,6 @@ export function FileBrowser(props) { } }, [filesToUpload]); - function canUpload() { - return api.loggedIn || (tokenObj.valid && tokenObj.type === "upload"); - } - function onAddUploadFiles(acceptedFiles, rejectedFiles) { if (rejectedFiles && rejectedFiles.length > 0) { @@ -179,6 +179,13 @@ export function FileBrowser(props) { } } + let selectedIds = getSelectedIds(); + let selectedCount = selectedIds.length; + let uploadZone = <>; + let writePermissions = canUpload(); + let uploadedFiles = []; + let alertElements = []; + function createFileList(elements, indentation = 0) { let rows = []; let rowIndex = 0; @@ -224,6 +231,10 @@ export function FileBrowser(props) { onSelectFile(e, uid)} /> + { writePermissions ? + onPopupOpen("rename", uid)} /> : + <> } ); @@ -236,14 +247,6 @@ export function FileBrowser(props) { return rows; } - 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( @@ -287,6 +290,7 @@ export function FileBrowser(props) { setFilesToUpload(files); } + let rows = createFileList(files); if (writePermissions) { for (let i = 0; i < filesToUpload.length; i++) { @@ -340,6 +344,54 @@ export function FileBrowser(props) { ; } + let singleButton = { + gridColumnStart: 1, + gridColumnEnd: 3, + width: "40%", + margin: "0 auto" + }; + + function createPopup() { + let title = ""; + let inputs = []; + + if (popup.type === "createDirectory" || popup.type === "moveFiles") { + inputs.push( +
+ + +
+ ); + } + + if (popup.type === "createDirectory" || popup.type === "rename") { + inputs.push( +
+ + onPopupChange(e, "name")}/> +
+ ); + } + + if (popup.type === "createDirectory") { + title = "Create Directory"; + } else if (popup.type === "moveFiles") { + title = "Move Files"; + } else if (popup.type === "rename") { + title = "Rename File or Directory"; + } + + return + { inputs } + + } + return <>

@@ -366,12 +418,11 @@ export function FileBrowser(props) {
- - { writePermissions ? <> @@ -381,11 +432,18 @@ export function FileBrowser(props) { Delete Selected Files ({selectedCount}) {api.loggedIn ? - : + + + : <> } @@ -402,28 +460,11 @@ export function FileBrowser(props) {
{alertElements}
- -
- - -
- {popup.type !== "upload" ? -
- - onPopupChange(e, "directoryName")}/> -
: <> - } -
+ { createPopup() } ; - function onPopupOpen(type) { - setPopup({...popup, visible: true, type: type}); + function onPopupOpen(type, target = null) { + setPopup({...popup, visible: true, type: type, target: target}); } function onPopupClose() { @@ -439,13 +480,29 @@ export function FileBrowser(props) { if (btn === "Ok") { let parentId = popup.directory === 0 ? null : popup.directory; if (popup.type === "createDirectory") { - api.createDirectory(popup.directoryName, parentId).then((res) => { + api.createDirectory(popup.name, parentId).then((res) => { if (!res.success) { pushAlert(res, "Error creating directory"); } else { fetchFiles(); } }); + } else if (popup.type === "moveFiles") { + api.moveFiles(selectedIds, parentId).then((res) => { + if (!res.success) { + pushAlert(res, "Error moving files"); + } else { + fetchFiles(); + } + }); + } else if (popup.type === "rename") { + api.rename(popup.target, popup.name, tokenObj.valid ? tokenObj.value : null).then((res) => { + if (!res.success) { + pushAlert(res, "Error renaming file or directory"); + } else { + fetchFiles(); + } + }); } } diff --git a/fileControlPanel/src/index.js b/fileControlPanel/src/index.js index e096076..335127b 100644 --- a/fileControlPanel/src/index.js +++ b/fileControlPanel/src/index.js @@ -84,9 +84,9 @@ class FileControlPanel extends React.Component { if (this.onSelectFile(e, uid, fileElement.items)) { if (!e.target.checked) { fileElement.selected = false; - } else if (this.getSelectedIds(fileElement.items, false).length === Object.values(fileElement.items).length) { + }/* else if (this.getSelectedIds(fileElement.items, false).length === Object.values(fileElement.items).length) { fileElement.selected = true; - } + }*/ found = true; break; } diff --git a/js/files.min.js b/js/files.min.js index c9218fc..fa35515 100644 --- a/js/files.min.js +++ b/js/files.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>>1,a=e[r];if(!(void 0!==a&&0S(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&&0s?(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.expirationTimea;)q(e,n=r[a++],t[n]);return e},Q=function(e){var t=N.call(this,e=b(e,!0));return!(this===I&&a(R,e)&&!a(z,e))&&(!(t||!a(this,e)||!a(R,e)||a(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=L(e),t=b(t,!0),e!==I||!a(R,t)||a(z,t)){var n=E(e,t);return!n||!a(R,t)||a(e,F)&&e[F][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=O(L(e)),r=[],i=0;n.length>i;)a(R,t=n[i++])||t==F||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=O(n?z:L(e)),i=[],o=0;r.length>o;)!a(R,t=r[o++])||n&&!a(I,t)||i.push(R[t]);return i};U||(s((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(z,n),a(this,F)&&a(this[F],e)&&(this[F][e]=!1),V(this,e,k(1,n))};return i&&B&&V(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=q,n(41).f=Y.f=X,n(54).f=Q,D.f=ee,i&&!n(33)&&s(I,"propertyIsEnumerable",Q,!0),_.f=function(e){return G(m(e))}),o(o.G+o.W+o.F*!U,{Symbol:H});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)m(te[ne++]);for(var re=x(m.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=H(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){B=!0},useSimple:function(){B=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?w(e):K(w(e),t)},defineProperty:q,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){D.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return D.f(M(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=H();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(g(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,A.apply(P,r)}}),H.prototype[C]||n(14)(H.prototype,C,H.prototype.valueOf),c(H,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(52)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(38),a=n(58),i=n(54);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(40)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(103)})},function(e,t,n){var r=n(19),a=n(20).f;n(29)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(21);n(29)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(38);n(29)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(29)("getOwnPropertyNames",(function(){return n(104).f}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7);n(29)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(29)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(29)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(105)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(106)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(76).set})},function(e,t,n){"use strict";var r=n(48),a={};a[n(8)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(107)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(7),a=n(21),i=n(8)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(109);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(110);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(5),a=n(18),i=n(24),o=n(78),s=n(27),u=n(6),l=n(41).f,d=n(20).f,c=n(11).f,f=n(49).trim,m=r.Number,_=m,h=m.prototype,p="Number"==i(n(40)(h)),y="trim"in String.prototype,v=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof m&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new _(v(t)),n,m):v(t)};for(var g,M=n(10)?l(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;M.length>L;L++)a(_,g=M[L])&&!a(m,g)&&c(m,g,d(_,g));m.prototype=h,h.constructor=m,n(15)(r,"Number",m)}},function(e,t,n){"use strict";var r=n(2),a=n(25),i=n(111),o=n(79),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},m=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},_=function(e,t,n){return 0===t?n:t%2==1?_(e,t-1,n*e):_(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(6)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*_(2,69,1))-69)<0?u*_(2,-t,1):u/_(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(_(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(6),i=n(111),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(112)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(112),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(110);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(109);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(113),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(80);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(81);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(114)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(6)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(113)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(80)})},function(e,t,n){var r=n(2),a=n(81),i=Math.exp;r(r.S+r.F*n(6)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(81),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(39),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(19),i=n(9);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(60)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(84),o="".endsWith;r(r.P+r.F*n(85)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(84);r(r.P+r.F*n(85)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(79)})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(84),o="".startsWith;r(r.P+r.F*n(85)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27);r(r.P+r.F*n(6)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(366);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(6),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(8)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(369))},function(e,t,n){"use strict";var r=n(4),a=n(27);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(59)})},function(e,t,n){"use strict";var r=n(23),a=n(2),i=n(12),o=n(115),s=n(86),u=n(9),l=n(87),d=n(88);a(a.S+a.F*!n(62)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),m="function"==typeof this?this:Array,_=arguments.length,h=_>1?arguments[1]:void 0,p=void 0!==h,y=0,v=d(f);if(p&&(h=r(h,_>2?arguments[2]:void 0,2)),null==v||m==Array&&s(v))for(n=new m(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=v.call(f),n=new m;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(87);r(r.S+r.F*n(6)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(19),i=[].join;r(r.P+r.F*(n(53)!=Object||!n(26)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(75),i=n(24),o=n(39),s=n(9),u=[].slice;r(r.P+r.F*n(6)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(117)}),n(35)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(90)}),n(35)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(30)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("find")},function(e,t,n){"use strict";var r=n(2),a=n(30)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)(i)},function(e,t,n){n(42)("Array")},function(e,t,n){var r=n(5),a=n(78),i=n(11).f,o=n(41).f,s=n(61),u=n(55),l=r.RegExp,d=l,c=l.prototype,f=/a/g,m=/a/g,_=new l(f)!==f;if(n(10)&&(!_||n(6)((function(){return m[n(8)("match")]=!1,l(f)!=f||l(m)==m||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(_?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(42)("RegExp")},function(e,t,n){"use strict";n(120);var r=n(4),a=n(55),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(6)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(4),a=n(9),i=n(93),o=n(63);n(64)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],m=0;null!==(c=o(u,l));){var _=String(c[0]);f[m]=_,""===_&&(u.lastIndex=i(l,a(u.lastIndex),d)),m++}return 0===m?null:f}]}))},function(e,t,n){"use strict";var r=n(4),a=n(12),i=n(9),o=n(25),s=n(93),u=n(63),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n(64)("replace",2,(function(e,t,n,_){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=_(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),m="function"==typeof t;m||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var v=[];;){var g=u(c,f);if(null===g)break;if(v.push(g),!p)break;""===String(g[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var M,L="",b=0,k=0;k=b&&(L+=f.slice(b,Y)+E,b=Y+w.length)}return L+f.slice(b)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=m;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(4),a=n(106),i=n(63);n(64)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(61),a=n(4),i=n(56),o=n(93),s=n(9),u=n(63),l=n(92),d=n(6),c=Math.min,f=[].push,m="length",_=!d((function(){RegExp(4294967295,"y")}));n(64)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[m]||2!="ab".split(/(?:ab)*/)[m]||4!=".".split(/(.?)(.?)/)[m]||".".split(/()()/)[m]>1||"".split(/.?/)[m]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,_=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[m]>1&&i.index=_));)h.lastIndex===i.index&&h.lastIndex++;return c===a[m]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[m]>_?u.slice(0,_):u}:"0".split(void 0,0)[m]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),m=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(_?"y":"g"),v=new m(_?l:"^(?:"+l.source+")",y),g=void 0===t?4294967295:t>>>0;if(0===g)return[];if(0===f.length)return null===u(v,f)?[f]:[];for(var M=0,L=0,b=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=A(e);if(i&&(t=M((function(){S?w.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||A(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},A=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(u,(function(){var t;S?w.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},C=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),H(t,!0))},N=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=O(e))?v((function(){var r={_w:n,_d:!1};try{t.call(e,l(N,r,1),l(C,r,1))}catch(e){C.call(r,e)}})):(n._v=e,n._s=1,H(n,!1))}catch(e){C.call({_w:n,_d:!1},e)}}};j||(D=function(e){_(this,D,"Promise","_h"),m(e),r.call(this);try{e(l(N,this,1),l(C,this,1))}catch(e){C.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(45)(D.prototype,{then:function(e,t){var n=E(p(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&H(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(N,e,1),this.reject=l(C,e,1)},g.f=E=function(e){return e===D||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!j,{Promise:D}),n(47)(D,"Promise"),n(42)("Promise"),o=n(22).Promise,c(c.S+c.F*!j,"Promise",{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!j),"Promise",{resolve:function(e){return b(s&&this===o?D:this,e)}}),c(c.S+c.F*!(j&&n(62)((function(e){D.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=E(t),r=n.resolve,a=n.reject,i=M((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=E(t),r=n.reject,a=M((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(127),a=n(46);n(66)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(67),i=n(97),o=n(4),s=n(39),u=n(9),l=n(7),d=n(5).ArrayBuffer,c=n(56),f=i.ArrayBuffer,m=i.DataView,_=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return _&&_(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(6)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new m(this),d=new m(i),_=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(20),a=n(21),i=n(18),o=n(2),s=n(7),u=n(4);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(20),a=n(2),i=n(4);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(21),i=n(4);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(4),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(129)})},function(e,t,n){var r=n(2),a=n(4),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(20),i=n(21),o=n(18),s=n(2),u=n(36),l=n(4),d=n(7);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,m=arguments.length<4?t:arguments[3],_=a.f(l(t),n);if(!_){if(d(f=i(t)))return e(f,n,s,m);_=u(0)}if(o(_,"value")){if(!1===_.writable||!d(m))return!1;if(c=a.f(m,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(m,n,c)}else r.f(m,n,u(0,s));return!0}return void 0!==_.set&&(_.set.call(m,s),!0)}})},function(e,t,n){var r=n(2),a=n(76);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(57)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(130),i=n(12),o=n(9),s=n(13),u=n(89);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(35)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(130),i=n(12),o=n(9),s=n(25),u=n(89);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(35)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(60)(!0),i=n(6)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(131),i=n(65),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(131),i=n(65),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(49)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(49)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(28),i=n(9),o=n(61),s=n(55),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(83)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(72)("asyncIterator")},function(e,t,n){n(72)("observable")},function(e,t,n){var r=n(2),a=n(129),i=n(19),o=n(20),s=n(87);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(132)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(132)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(68),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(68),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27),o=n(21),s=n(20).f;n(10)&&r(r.P+n(68),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27),o=n(21),s=n(20).f;n(10)&&r(r.P+n(68),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(133)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(133)("Set")})},function(e,t,n){n(69)("Map")},function(e,t,n){n(69)("Set")},function(e,t,n){n(69)("WeakMap")},function(e,t,n){n(69)("WeakSet")},function(e,t,n){n(70)("Map")},function(e,t,n){n(70)("Set")},function(e,t,n){n(70)("WeakMap")},function(e,t,n){n(70)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(5)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(5)})},function(e,t,n){var r=n(2),a=n(24);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(135),i=n(114);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(135)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(22),i=n(5),o=n(56),s=n(122);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(96),i=n(121);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(32),a=n(4),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(32),a=n(4),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(32),a=n(4),i=n(21),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(125),a=n(134),i=n(32),o=n(4),s=n(21),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(32),a=n(4),i=n(21),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(95)(),i=n(5).process,o="process"==n(24)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(22),o=n(95)(),s=n(8)("observable"),u=n(13),l=n(4),d=n(43),c=n(45),f=n(14),m=n(44),_=m.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},v=function(e){y(e)||(e._o=void 0,p(e))},g=function(e,t){l(e),this._c=void 0,this._o=e,e=new M(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};g.prototype=c({},{unsubscribe:function(){v(this)}});var M=function(e){this._s=e};M.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{v(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new g(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(m(e,!1,(function(e){if(t.next(e),n)return _}))===_)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(94);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(91),a=n(38),i=n(15),o=n(5),s=n(14),u=n(50),l=n(8),d=l("iterator"),c=l("toStringTag"),f=u.Array,m={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_=a(m),h=0;h<_.length;h++){var p,y=_[h],v=m[y],g=o[y],M=g&&g.prototype;if(M&&(M[d]||s(M,d,f),M[c]||s(M,c,y),u[y]=f,v))for(p in r)M[p]||i(M,p,r[p],!0)}},function(e,t,n){(function(t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",u="object"==typeof e,l=t.regeneratorRuntime;if(l)u&&(e.exports=l);else{(l=t.regeneratorRuntime=u?e.exports:{}).wrap=h;var d={},c={};c[i]=function(){return this};var f=Object.getPrototypeOf,m=f&&f(f(T([])));m&&m!==n&&r.call(m,i)&&(c=m);var _=g.prototype=y.prototype=Object.create(c);v.prototype=_.constructor=g,g.constructor=v,g[s]=v.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(_),e},l.awrap=function(e){return{__await:e}},M(L.prototype),L.prototype[o]=function(){return this},l.AsyncIterator=L,l.async=function(e,t,n,r){var a=new L(h(e,t,n,r));return l.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},M(_),_[s]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;w(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new Y(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return D()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=b(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function v(){}function g(){}function M(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n1)for(var n=1;n=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(143);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r=n(506);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(508)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,n){(t=n(507)(!1)).push([e.i,".file-row td {\n padding: 0;\n border: none;\n vertical-align: middle;\n font-size: 0.9em;\n}\n\n.file-control-buttons {\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n}\n\n.file-control-buttons > button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > .status-icon {\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.uploaded-file > .cancel-button {\n position: absolute;\n left: 0;\n right: 0;\n top: 15px;\n bottom: 0;\n opacity: 0;\n}\n\n.uploaded-file:hover > .file-icon {\n opacity: 0.5;\n}\n\n.uploaded-file:hover > .cancel-button {\n opacity: 1.0;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.token-table td:nth-child(4) > i {\n padding-left: 10px;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-browser-restrictions {\n display: grid;\n grid-template-columns: repeat(4, auto);\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,r,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=b.bind(null,n,o,!1),a=b.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),h(e,t),t}(t),r=w.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=k.bind(null,n),a=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=_(e,t);return m(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"createDownloadToken",value:function(e,t){return this.apiCall("file/createDownloadToken",{files:t,durability:e})}},{key:"createUploadToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return this.apiCall("file/createUploadToken",{parentId:t,durability:e,maxFiles:n,maxSize:r,extensions:a})}},{key:"createDirectory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/createDirectory",{name:e,parentId:t})}},{key:"getRestrictions",value:function(){return this.apiCall("file/getRestrictions")}},{key:"upload",value:(a=d(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,l,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:null,r=d.length>2&&void 0!==d[2]?d[2]:null,a=d.length>3&&void 0!==d[3]?d[3]:null,i=d.length>4&&void 0!==d[4]?d[4]:null,o=this.csrfToken(),(s=new FormData).append("file",t),o&&s.append("csrf_token",o),n&&s.append("token",n),r&&s.append("parentId",r),e.next=12,u.a.post("/api/file/upload",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:i||function(){},cancelToken:a.token});case 12:return l=e.sent,e.abrupt("return",l.data);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}])&&c(t.prototype,n),r&&c(t,r),e}();function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var b=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function k(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=b.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var w=[".DS_Store","Thumbs.db"];function Y(e){return(null!==e.target&&e.target.files?S(e.target.files):[]).map((function(e){return k(e)}))}function T(e,t){return g(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=S(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(x))]):[3,2];case 1:return[2,D(E(r.sent()))];case 2:return[2,D(S(e.files).map((function(e){return k(e)})))]}}))}))}function D(e){return e.filter((function(e){return-1===w.indexOf(e.name)}))}function S(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,R(n)];if(e.sizen)return[!1,R(n)]}return[!0,null]}function B(e){return null!=e}function V(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=C(U(e,n),1)[0],i=C(J(e,r,a),1)[0];return t&&i}))}function G(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function $(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function q(e){e.preventDefault()}function K(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Q(e){return-1!==e.indexOf("Edge/")}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return K(e)||Q(e)}function X(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ue=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ie(ie({},le),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,m=t.onDrop,_=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,v=t.noClick,g=t.noKeyboard,M=t.noDrag,L=t.noDragEventsBubbling,b=Object(r.useRef)(null),k=Object(r.useRef)(null),w=Object(r.useReducer)(fe,ce),Y=te(w,2),T=Y[0],D=Y[1],S=T.isFocused,x=T.isFileDialogActive,E=T.draggedFiles,j=Object(r.useCallback)((function(){k.current&&(D({type:"openDialog"}),k.current.value=null,k.current.click())}),[D]),O=function(){x&&setTimeout((function(){k.current&&(k.current.files.length||(D({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",O,!1),function(){window.removeEventListener("focus",O,!1)}}),[k,x,p]);var H=Object(r.useCallback)((function(e){b.current&&b.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),j()))}),[b,k]),P=Object(r.useCallback)((function(){D({type:"focus"})}),[]),A=Object(r.useCallback)((function(){D({type:"blur"})}),[]),F=Object(r.useCallback)((function(){v||(Z()?setTimeout(j,0):j())}),[k,v]),C=Object(r.useRef)([]),N=function(e){b.current&&b.current.contains(e.target)||(e.preventDefault(),C.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",q,!1),document.addEventListener("drop",N,!1)),function(){y&&(document.removeEventListener("dragover",q),document.removeEventListener("drop",N))}}),[b,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e),C.current=[].concat(ee(C.current),[e.target]),$(e)&&Promise.resolve(i(e)).then((function(t){G(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),R=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),re(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return $(e)&&f&&f(e),!1}),[f,L]),z=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e);var t=C.current.filter((function(e){return b.current&&b.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),C.current=t,t.length>0||(D({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),$(e)&&c&&c(e))}),[b,c,L]),B=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e),C.current=[],$(e)&&Promise.resolve(i(e)).then((function(t){if(!G(e)||L){var r=[],a=[];t.forEach((function(e){var t=te(U(e,n),2),i=t[0],u=t[1],l=te(J(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[I]})})),r.splice(0)),D({acceptedFiles:r,fileRejections:a,type:"setFiles"}),m&&m(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&_&&_(r,e)}})),D({type:"reset"})}),[u,n,s,o,l,i,m,_,h,L]),K=function(e){return a?null:e},Q=function(e){return g?null:K(e)},ne=function(e){return M?null:K(e)},re=function(e){L&&e.stopPropagation()},ae=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=se(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return ie(ie(oe({onKeyDown:Q(X(r,H)),onFocus:Q(X(i,P)),onBlur:Q(X(o,A)),onClick:K(X(s,F)),onDragEnter:ne(X(u,W)),onDragOver:ne(X(l,R)),onDragLeave:ne(X(d,z)),onDrop:ne(X(c,B))},n,b),a||g?{}:{tabIndex:0}),f)}}),[b,H,P,A,F,W,R,z,B,g,M,a]),ue=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),de=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=se(e,["refKey","onChange","onClick"]),s=oe({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:K(X(a,B)),onClick:K(X(i,ue)),autoComplete:"off",tabIndex:-1},r,k);return ie(ie({},s),o)}}),[k,n,u,B,a]),me=E.length,_e=me>0&&V({files:E,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=me>0&&!_e;return ie(ie({},T),{},{isDragAccept:_e,isDragReject:he,isFocused:S&&!a,getRootProps:ae,getInputProps:de,rootRef:b,inputRef:k,open:K(j)})}(se(e,["children"])),o=i.open,s=se(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(ie(ie({},s),{},{open:o})))}));ue.displayName="Dropzone";var le={disabled:!1,getFilesFromEvent:function(e){return g(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?T(e.dataTransfer,e.type):Y(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};ue.defaultProps=le,ue.propTypes={children:v.a.func,accept:v.a.oneOfType([v.a.string,v.a.arrayOf(v.a.string)]),multiple:v.a.bool,preventDropOnDocument:v.a.bool,noClick:v.a.bool,noKeyboard:v.a.bool,noDrag:v.a.bool,noDragEventsBubbling:v.a.bool,minSize:v.a.number,maxSize:v.a.number,maxFiles:v.a.number,disabled:v.a.bool,getFilesFromEvent:v.a.func,onFileDialogCancel:v.a.func,onDragEnter:v.a.func,onDragLeave:v.a.func,onDragOver:v.a.func,onDrop:v.a.func,onDropAccepted:v.a.func,onDropRejected:v.a.func};var de=ue,ce={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function fe(e,t){switch(t.type){case"focus":return ie(ie({},e),{},{isFocused:!0});case"blur":return ie(ie({},e),{},{isFocused:!1});case"openDialog":return ie(ie({},e),{},{isFileDialogActive:!0});case"closeDialog":return ie(ie({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ie(ie({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ie(ie({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ie(ie({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function me(e){var t=e.onClose||null,n=e.title||"Untitled Alert",r=e.message||"Alert message",i=e.type||"danger",o="ban";return"warning"===i?o="exclamation-triangle":"success"===i&&(o="check"),a.a.createElement("div",{className:"alert alert-"+i+" alert-dismissible"},t?a.a.createElement("button",{type:"button",className:"close","data-dismiss":"alert","aria-hidden":"true",onClick:t},"×"):null,a.a.createElement("h5",null,a.a.createElement(p,{icon:o,className:"icon"})," ",n),r)}function _e(e){for(var t=e.buttons||["Ok","Cancel"],n=e.onClick||function(){},r=!!e.visible,i=e.title||"Popup Title",o=e.onClose||function(){},s=[],u=["primary","secondary","success","warning","danger"],l=function(e){var r=t[e],i=u[e%u.length];s.push(a.a.createElement("button",{key:"btn-"+e,type:"button",className:"btn btn-"+i,"data-dismiss":"modal",onClick:function(){return n(r)}},r))},d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:a/2,x2:n,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:a/2,x2:n,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2x",n="";if(e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=Me(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(p,{icon:n,type:"far",className:"p-1 align-middle file-icon fa-"+t})}function w(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return 0===n||Math.round(e)===e?e+" "+t[n]:e.toFixed(1)+" "+t[n]}function Y(e){if("directory"===e.toLowerCase())return"Directory";switch(e.toLowerCase()){case"image/jpeg":return"JPEG-Image";case"image/png":return"PNG-Image";case"application/pdf":return"PDF-Document";case"text/plain":return"Text-Document";case"application/x-dosexec":return"Windows Executable";case"application/vnd.oasis.opendocument.text":return"OpenOffice-Document";default:return e}}Object(r.useEffect)((function(){for(var e=v.slice(),t=0;t1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=.45,l="lg",d=Object.values(t),c=function(){var t=m[f],c=t.name,_=t.uid,h=t.isDirectory?"Directory":t.mimeType,p=t.isDirectory?"":w(t.size),y=t.isDirectory?"application/x-directory":t.mimeType,v=a&&a.valid?"&token="+a.value:"",g=[];if(n>0){for(var T=0;T0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=[];n=n||t;for(var i=0,o=Object.values(n);i=0&&e<_.length){var t=_.slice();t.splice(e,1),h(t)}}(e)}})))},P=0;P<_.length;P++)H(P);for(var A=[],F=0,C=Object.entries(s);F=100;j.push(r.createElement("span",{className:"uploaded-file",key:e},k(n.type,"3x"),r.createElement("span",null,n.name),i?r.createElement(r.Fragment,null):r.createElement("div",{className:"progress border border-primary position-relative"},r.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100",style:{width:a+"%"}}),r.createElement("span",{className:"justify-content-center d-flex position-absolute w-100",style:{top:"7px"}},a+"%")),r.createElement(p,{icon:i?n.success?"check":"times":"spinner",className:"status-icon "+(i?n.success?"text-success":"text-danger":"text-secondary")}),r.createElement(p,{icon:"times",className:"text-danger cancel-button fa-2x",title:"Cancel Upload",onClick:function(t){return function(e,t){e.stopPropagation(),e.preventDefault();var n=v[t].cancelToken;n&&v[t].progress<1&&n.cancel("Upload cancelled");var r=v.slice();r.splice(t,1),g(r)}(t,e)}})))},I=0;I0&&V({msg:"The following files could not be uploaded due to given restrictions: "+t.map((function(e){return e.file.name})).join(", ")},"Cannot upload file"),e&&e.length>0){var n=v.slice();n.push.apply(n,ge(e)),g(n)}}},{accept:(l.extensions||"").split(",").map((function(e){return e.trim()})).map((function(e){return!e.startsWith(".")&&e.length>0?"."+e:e})).join(","),maxFiles:l.maxFiles,maxSize:l.maxSize}),(function(e){var t=e.getRootProps,n=e.getInputProps;return r.createElement("section",{className:"file-upload-container"},r.createElement("div",t(),r.createElement("input",n()),r.createElement("p",null,"Drag 'n' drop some files here, or click to select files"),0===j.length?r.createElement(p,{className:"mx-auto fa-3x text-black-50",icon:"upload"}):r.createElement("div",null,j)))})))}return r.createElement(r.Fragment,null,r.createElement("h4",null,r.createElement(p,{icon:"sync",className:"mx-3 clickable small",onClick:B}),"File Browser"),r.createElement("table",{className:"table data-table file-table"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null),r.createElement("th",null,"Name"),r.createElement("th",null,"Type"),r.createElement("th",null,"Size"),r.createElement("th",null))),r.createElement("tbody",null,T.length>0?T:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No files uploaded yet")))),r.createElement("div",{className:"file-control-buttons"},r.createElement("button",{type:"button",className:"btn btn-success",disabled:0===S,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?"":"&token="+a.value,r=e.map((function(e){return"id[]="+e})).join("&");fetch("/api/file/download?"+r+t).then((function(e){var t=(e.headers.get("Content-Disposition")||"").split(";").filter((function(e){return e.trim().toLowerCase().startsWith("filename=")})),n=null;n=t.length>0?t[0].trim().substr("filename=".length):null,e.blob().then((function(e){var t=window.URL.createObjectURL(e),r=document.createElement("a");r.href=t,null!==n&&(r.download=n),r.click()}))}))}}(D)}},r.createElement(p,{icon:"download",className:"mr-1"}),"Download Selected Files (",S,")"),r.createElement("span",null),E?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===S,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?null:a.value;n.delete(e,t).then((function(e){e.success?B():V(e)}))}}(D)}},r.createElement(p,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",S,")"),n.loggedIn?r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(e){return t="createDirectory",void f(pe(pe({},c),{},{visible:!0,type:t}));var t}},r.createElement(p,{icon:"plus",className:"mr-1"}),"Create Directory"):r.createElement(r.Fragment,null)):r.createElement(r.Fragment,null)),x,r.createElement("div",{className:"file-browser-restrictions px-4 mb-4"},r.createElement("b",null,"Restrictions:"),r.createElement("span",null,"Max. Files: ",l.maxFiles),r.createElement("span",null,"Max. Filesize: ",w(l.maxSize)),r.createElement("span",null,l.extensions?"Allowed extensions: "+l.extensions:"All extensions allowed")),r.createElement("div",null,O),r.createElement(_e,{title:"Create Directory",visible:c.visible,buttons:["Ok","Cancel"],onClose:U,onClick:function(e){if("Ok"===e){var t=0===c.directory?null:c.directory;"createDirectory"===c.type&&n.createDirectory(c.directoryName,t).then((function(e){e.success?B():V(e,"Error creating directory")}))}U()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:c.directory,className:"form-control",onChange:function(e){return J(e,"directory")}},A)),"upload"!==c.type?r.createElement("div",{className:"form-group"},r.createElement("label",null,"Directory Name"),r.createElement("input",{type:"text",className:"form-control",value:c.directoryName,maxLength:32,placeholder:"Enter name…",onChange:function(e){return J(e,"directoryName")}})):r.createElement(r.Fragment,null)));function U(){f(pe(pe({},c),{},{visible:!1}))}function J(e,t){f(pe(pe({},c),{},ye({},t,e.target.value)))}function B(){var e;if(a.valid)e=n.validateToken(a.value);else{if(!n.loggedIn)return;e=n.listFiles()}e.then((function(e){var t;e?(o(e.files),(t=v.filter((function(e){return!e.progress||e.progress<1}))).length!==v.length&&g(t)):V(e)}))}function V(e,t){var n=_.slice();n.push({type:"danger",message:e.msg,title:t}),h(n)}function G(e){var t=n.loggedIn?null:a.value,r=n.loggedIn&&0!==c.directory?c.directory:null,i=v[e],o=u.a.CancelToken.source(),s=v.slice();s[e].cancelToken=o,s[e].progress=0,g(s),n.upload(i,t,r,o,(function(t){return function(e,t){if(t=e.total?1:e.loaded/e.total,g(n)}}(t,e)})).then((function(t){var n=v.slice();n[e].success=t.success,g(n),t.success?B():V(t)})).catch((function(e){e&&"Upload cancelled"!==e.message&&V({msg:e},"Error uploading files")}))}}var we=n(1),Ye=n.n(we),Te="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),De=new Uint8Array(16);function Se(){if(!Te)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Te(De)}for(var xe=[],Ee=0;Ee<256;++Ee)xe[Ee]=(Ee+256).toString(16).substr(1);var je=function(e,t){var n=t||0,r=xe;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Oe=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||Se)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var i=0;i<16;++i)t[r+i]=a[i];return t||je(a)};function He(e,t){for(var n=0;nM},S=function(e){return function(e){var t=p[e].b;return h+t+g}(e)>L},x=function(e){return function(e){return Y(e)<0}(e)||D(e)||function(e){return T(e)<0}(e)||S(e)},E=function(e){return!x(e)},j=["top","bottom","left","right"],O=[],H=0;H<4;H++){var P=j[H];E(P)&&O.push(P)}var A,F=!1,C=a!==r;return E(a)&&C?(F=!0,A=a):O.length>0&&x(a)&&x(r)&&(F=!0,A=O[0]),F?{isNewState:!0,newState:{place:A}}:{isNewState:!1,position:{left:parseInt(Y(r)-w,10),top:parseInt(T(r)-k,10)}}}var Qe=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},Ze=function(e,t,n){var r=t.getBoundingClientRect(),a=r.top,i=r.left,o=Qe(t),s=o.width,u=o.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+s/2,mouseY:a+u/2}},Xe=function(e,t,n,r,a){var i,o,s,u;return"float"===e?(i={l:-r/2,r:r/2,t:-(a+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:a+3+2+12},u={l:-(r+3+2),r:-3,t:-a/2,b:a/2},o={l:3,r:r+3+2,t:-a/2,b:a/2}):"solid"===e&&(i={l:-r/2,r:r/2,t:-(n/2+a+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+a+2},u={l:-(r+t/2+2),r:-t/2,t:-a/2,b:a/2},o={l:t/2,r:r+t/2+2,t:-a/2,b:a/2}),{top:i,bottom:s,left:u,right:o}},et=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffsetX:t,extraOffsetY:n}},tt=function(e){for(var t=e;t;){var n=window.getComputedStyle(t);if("none"!==n.getPropertyValue("transform")||"transform"===n.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function nt(e,t,n,r){if(t)return t;if(null!=n)return n;if(null===n)return null;var i=//;return r&&"false"!==r&&i.test(e)?e.split(i).map((function(e,t){return a.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function rt(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}function at(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var it,ot,st,ut={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};function lt(e,t,n,r){return function(e,t){var n=t.text,r=t.background,a=t.border,i=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(n,";\n\t background: ").concat(r,";\n\t border: 1px solid ").concat(a,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(a,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(i,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(a,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(i,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(a,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(i,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(a,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(i,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,n){var r=e.text,a=e.background,i=e.border,o=e.arrow?e.arrow:e.background,s=function(e){return ut[e]?Ne({},ut[e]):void 0}(t);r&&(s.text=r);a&&(s.background=a);n&&(s.border=i||("light"===t?"black":"white"));o&&(s.arrow=o);return s}(t,n,r))}var dt,ct=function(e){e.hide=function(e){Ue(Ie.HIDE,{target:e})},e.rebuild=function(){Ue(Ie.REBUILD)},e.show=function(e){Ue(Ie.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.showTooltip({currentTarget:t&&e.detail.target},!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(it=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(Ie.HIDE,this.globalHide),window.addEventListener(Ie.HIDE,this.globalHide,!1),window.removeEventListener(Ie.REBUILD,this.globalRebuild),window.addEventListener(Ie.REBUILD,this.globalRebuild,!1),window.removeEventListener(Ie.SHOW,this.globalShow),window.addEventListener(Ie.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(Ie.HIDE,this.globalHide),window.removeEventListener(Ie.REBUILD,this.globalRebuild),window.removeEventListener(Ie.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(it=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,a=n.eventOff,i=e.getAttribute("data-event")||r,o=e.getAttribute("data-event-off")||a;i.split(" ").forEach((function(n){e.removeEventListener(n,Ve.get(e,n));var r=Je.bind(t,o);Ve.set(e,n,r),e.addEventListener(n,r,!1)})),o&&o.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,a=n||e.getAttribute("data-event"),i=r||e.getAttribute("data-event-off");e.removeEventListener(a,Ve.get(e,n)),i&&e.removeEventListener(i,this.hideTooltip)}}(it=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(it=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(it=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,a=n.eventOff,i=n.possibleCustomEvents,o=n.possibleCustomEventsOff,s=qe(),u=$e(e,"data-event"),l=$e(e,"data-event-off");null!=r&&(u[r]=!0),null!=a&&(l[a]=!0),i.split(" ").forEach((function(e){return u[e]=!0})),o.split(" ").forEach((function(e){return l[e]=!0})),this.unbindBodyListener(s);var d=this.bodyModeListeners={};for(var c in null==r&&(d.mouseover=Ge.bind(this,this.showTooltip,{}),d.mousemove=Ge.bind(this,this.updateTooltip,{respectEffect:!0}),d.mouseout=Ge.bind(this,this.hideTooltip,{})),u)d[c]=Ge.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||a;Je.call(t,n,e)}),{customEvent:!0});for(var f in l)d[f]=Ge.bind(this,this.hideTooltip,{customEvent:!0});for(var m in d)s.addEventListener(m,d[m])},e.prototype.unbindBodyListener=function(e){e=e||qe();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((st=ot=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=ze(this,We(t).call(this,e))).state={uuid:e.uuid||"t"+Oe(),place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,customColors:{},offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:rt(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(t,e),Pe(t,null,[{key:"propTypes",get:function(){return{uuid:v.a.string,children:v.a.any,place:v.a.string,type:v.a.string,effect:v.a.string,offset:v.a.object,multiline:v.a.bool,border:v.a.bool,textColor:v.a.string,backgroundColor:v.a.string,borderColor:v.a.string,arrowColor:v.a.string,insecure:v.a.bool,class:v.a.string,className:v.a.string,id:v.a.string,html:v.a.bool,delayHide:v.a.number,delayUpdate:v.a.number,delayShow:v.a.number,event:v.a.string,eventOff:v.a.string,isCapture:v.a.bool,globalEventOff:v.a.string,getContent:v.a.any,afterShow:v.a.func,afterHide:v.a.func,overridePosition:v.a.func,disable:v.a.bool,scrollHide:v.a.bool,resizeHide:v.a.bool,wrapper:v.a.string,bodyMode:v.a.bool,possibleCustomEvents:v.a.string,possibleCustomEventsOff:v.a.string,clickable:v.a.bool}}}]),Pe(t,[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t),this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var e=this.props.id,t=this.getTargetArray(e),n=[];if(t.forEach((function(e){for(var t=e.parentNode;t.parentNode&&!t.host;)t=t.parentNode;var r=t.querySelector("head");n.push(r||t)})),n.length){var r=document.createElement("style");r.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',r.setAttribute("data-react-tooltip","true"),n.filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(e){e.querySelector("style[data-react-tooltip]")||e.appendChild(r)}))}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n=[];if(e){var r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t='[data-tip][data-for="'.concat(r,'"]')}else t="[data-tip]:not([data-for])";return at(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(at(e.shadowRoot.querySelectorAll(t)))})),n.concat(at(document.querySelectorAll(t)))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,a=t.isCapture,i=this.getTargetArray(n);i.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(i):i.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,a)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),nt(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(this.tooltipRef){if(t&&!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget})))return;var n=this.props,r=n.multiline,a=n.getContent,i=e.currentTarget.getAttribute("data-tip"),o=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,u=!0;e.currentTarget.getAttribute("data-scroll-hide")?u="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(u=this.props.scrollHide);var l=e.currentTarget.getAttribute("data-place")||this.props.place||"top",d=s?"solid":this.getEffect(e.currentTarget),c=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},f=Ke(e,e.currentTarget,this.tooltipRef,l,l,d,c);f.position&&this.props.overridePosition&&(f.position=this.props.overridePosition(f.position,e,e.currentTarget,this.tooltipRef,l,l,d,c));var m=f.isNewState?f.newState.place:l;this.clearTimer();var _=e.currentTarget,h=this.state.show?_.getAttribute("data-delay-update")||this.props.delayUpdate:0,p=this,y=function(){p.setState({originTooltip:i,isMultiline:o,desiredPlace:l,place:m,type:_.getAttribute("data-type")||p.props.type||"dark",customColors:{text:_.getAttribute("data-text-color")||p.props.textColor||null,background:_.getAttribute("data-background-color")||p.props.backgroundColor||null,border:_.getAttribute("data-border-color")||p.props.borderColor||null,arrow:_.getAttribute("data-arrow-color")||p.props.arrowColor||null},effect:d,offset:c,html:(_.getAttribute("data-html")?"true"===_.getAttribute("data-html"):p.props.html)||!1,delayShow:_.getAttribute("data-delay-show")||p.props.delayShow||0,delayHide:_.getAttribute("data-delay-hide")||p.props.delayHide||0,delayUpdate:_.getAttribute("data-delay-update")||p.props.delayUpdate||0,border:(_.getAttribute("data-border")?"true"===_.getAttribute("data-border"):p.props.border)||!1,extraClass:_.getAttribute("data-class")||p.props.class||p.props.className||"",disable:(_.getAttribute("data-tip-disable")?"true"===_.getAttribute("data-tip-disable"):p.props.disable)||!1,currentTarget:_},(function(){u&&p.addScrollListener(p.state.currentTarget),p.updateTooltip(e),a&&Array.isArray(a)&&(p.intervalUpdateContent=setInterval((function(){if(p.mount){var e=p.props.getContent,t=nt(i,"",e[0](),o),n=p.isEmptyTip(t);p.setState({isEmptyTip:n}),p.updatePosition()}}),a[1]))}))};h?this.delayReshow=setTimeout(y,h):y()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,a=n.disable,i=this.props.afterShow,o=this.getTooltipContent(),s=parseInt(r,10),u=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(o)&&!a){var l=function(){if(Array.isArray(o)&&o.length>0||o){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:u,show:!0},(function(){t.updatePosition(),n&&i&&i(e)}))}};clearTimeout(this.delayShowLoop),r?this.delayShowLoop=setTimeout(l,s):l()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},a=this.state.disable,i=r.isScroll,o=i?0:this.state.delayHide,s=this.props.afterHide,u=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(u)&&!a){if(t){var l=this.getTargetArray(this.props.id),d=l.some((function(t){return t===e.currentTarget}));if(!d||!this.state.show)return}var c=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(n.state.currentTarget),t&&s&&s(e)})))};this.clearTimer(),o?this.delayHideLoop=setTimeout(c,parseInt(o,10)):c()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(e){var t=this.isCapture(e);window.removeEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,a=t.place,i=t.desiredPlace,o=t.effect,s=t.offset,u=this.tooltipRef,l=Ke(n,r,u,a,i,o,s);if(l.position&&this.props.overridePosition&&(l.position=this.props.overridePosition(l.position,n,r,u,a,i,o,s)),l.isNewState)return this.setState(l.newState,(function(){e.updatePosition()}));u.style.left=l.position.left+"px",u.style.top=l.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"hasCustomColors",value:function(){var e=this;return Boolean(Object.keys(this.state.customColors).find((function(t){return"border"!==t&&e.state.customColors[t]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var e=this,n=this.state,r=n.extraClass,i=n.html,o=n.ariaProps,s=n.disable,u=this.getTooltipContent(),l=this.isEmptyTip(u),d=lt(this.state.uuid,this.state.customColors,this.state.type,this.state.border),c="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||s||l?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),f=this.props.wrapper;t.supportedWrappers.indexOf(f)<0&&(f=t.defaultProps.wrapper);var m=[c,r].filter(Boolean).join(" ");if(i){var _="".concat(u,"\n");return a.a.createElement(f,Fe({className:"".concat(m),id:this.props.id,ref:function(t){return e.tooltipRef=t}},o,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:_}}))}return a.a.createElement(f,Fe({className:"".concat(m),id:this.props.id},o,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),a.a.createElement("style",{dangerouslySetInnerHTML:{__html:d}}),u)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=rt(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?Ne({},t,{ariaProps:r}):null}}]),t}(a.a.Component),Ae(ot,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),Ae(ot,"supportedWrappers",["div","span"]),Ae(ot,"displayName","ReactTooltip"),(dt=it=st).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||vt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(e,t){if(e){if("string"==typeof e)return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e0?g:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No active tokens connected with this account")))),r.createElement("div",null,r.createElement("button",{type:"button",className:"btn btn-success m-2",onClick:function(){y(mt(mt({},h),{},{visible:!0}))}},r.createElement(p,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,b),r.createElement(_e,{title:"Create Token",visible:h.visible,buttons:["Ok","Cancel"],onClose:O,onClick:function(e){if("Ok"===e){var r=h.durability,a=0===r?null:Ye()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");if("download"===h.tokenType)t.createDownloadToken(r,n).then((function(e){if(e.success){var t=o.slice();t.push({token:e.token,valid_until:a,type:"download"}),s(t)}else j(e,"Error creating token")}));else if("upload"===h.tokenType){var i=0===h.directory?null:h.directory;t.createUploadToken(r,i,h.maxFiles,h.maxSize,h.extensions).then((function(e){if(e.success){var t=o.slice();t.push({uid:e.tokenId,token:e.token,valid_until:a,type:"upload"}),s(t)}else j(e,"Error creating token")}))}}O()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Durability in minutes (0 = forever):"),r.createElement("input",{type:"number",min:0,className:"form-control",value:h.durability,onChange:function(e){return H(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:h.tokenType,className:"form-control",onChange:function(e){return H(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===h.tokenType?r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:h.directory,className:"form-control",onChange:function(e){return H(e,"directory")}},Y)),r.createElement("b",null,"Upload Restrictions:"),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Files (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:25,className:"form-control",value:h.maxFiles,onChange:function(e){return H(e,"maxFiles")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Size per file in MB (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:10,className:"form-control",value:h.maxSize,onChange:function(e){return H(e,"maxSize")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Allowed Extensions:"),r.createElement("input",{type:"text",placeholder:"(no restrictions)",maxLength:256,className:"form-control",value:h.extensions,onChange:function(e){return H(e,"extensions")}}))):r.createElement(r.Fragment,null)));function j(e,t){var n=l.slice();n.push({type:"danger",message:e.msg,title:t}),d(n)}function O(){y(mt(mt({},h),{},{visible:!1}))}function H(e,t){y(mt(mt({},h),{},_t({},t,e.target.value)))}}function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e){return function(e){if(Array.isArray(e))return kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={};t=t||this.state.files,"/"===e&&(n[0]="/");for(var r=0,a=Object.values(t);r1?"/":"")+i.name;n[i.uid]=o,n=Object.assign(n,Yt({},this.getDirectories(o,i.items)))}}return n}},{key:"getSelectedIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?Yt({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Yt(Yt({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Yt(Yt({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Yt(Yt({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files,r.restrictions=n.restrictions):(r.token.value=r.token.value?"":t,r.errorMessage=n.msg),e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Yt(Yt({},this.state),{},{token:Yt(Yt({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.getSelectedIds(),i=this.getDirectories(),o=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(Mt,{api:this.api,selectedFiles:r,directories:i}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(ke,{files:this.state.files,token:this.state.token,api:this.api,restrictions:this.state.restrictions,directories:i,onSelectFile:this.onSelectFile.bind(this),onFetchFiles:this.onFetchFiles.bind(this)}))),o))}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(p,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage),a.a.createElement("div",{className:"mt-3"},"Or either ",a.a.createElement("a",{href:"/admin"},"login")," to access the file control panel."))))}var s=!0,u=window.location.pathname;if(u.startsWith("/files")&&(u=u.substr("/files".length)),u.length>1){var l=u.endsWith("/")?u.length-2:u.length-1,d=u.startsWith("/files/")?"/files/".length:1,c=u.substr(d,l);c&&(this.onValidateToken(c),s=!1)}return s&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Yt(Yt({},e.state),{},{loaded:!0,user:e.api.user,files:t.files})),e.api.getRestrictions().then((function(t){e.setState(Yt(Yt({},e.state),{},{restrictions:t.restrictions}))}))})):e.setState(Yt(Yt({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(p,{icon:"spinner"}))}}])&&Dt(t.prototype,n),r&&Dt(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Ot,null),document.getElementById("root"))}]); \ No newline at end of file + */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>>1,a=e[r];if(!(void 0!==a&&0S(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&&0s?(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.expirationTimea;)q(e,n=r[a++],t[n]);return e},Q=function(e){var t=N.call(this,e=b(e,!0));return!(this===I&&a(R,e)&&!a(z,e))&&(!(t||!a(this,e)||!a(R,e)||a(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=L(e),t=b(t,!0),e!==I||!a(R,t)||a(z,t)){var n=E(e,t);return!n||!a(R,t)||a(e,F)&&e[F][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=O(L(e)),r=[],i=0;n.length>i;)a(R,t=n[i++])||t==F||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=O(n?z:L(e)),i=[],o=0;r.length>o;)!a(R,t=r[o++])||n&&!a(I,t)||i.push(R[t]);return i};U||(s((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(z,n),a(this,F)&&a(this[F],e)&&(this[F][e]=!1),V(this,e,k(1,n))};return i&&B&&V(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=q,n(41).f=Y.f=X,n(54).f=Q,D.f=ee,i&&!n(33)&&s(I,"propertyIsEnumerable",Q,!0),_.f=function(e){return G(m(e))}),o(o.G+o.W+o.F*!U,{Symbol:H});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)m(te[ne++]);for(var re=x(m.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=H(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){B=!0},useSimple:function(){B=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?w(e):K(w(e),t)},defineProperty:q,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){D.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return D.f(M(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=H();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(g(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,A.apply(P,r)}}),H.prototype[C]||n(14)(H.prototype,C,H.prototype.valueOf),c(H,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(52)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(38),a=n(58),i=n(54);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(40)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(103)})},function(e,t,n){var r=n(19),a=n(20).f;n(29)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(21);n(29)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(38);n(29)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(29)("getOwnPropertyNames",(function(){return n(104).f}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(34).onFreeze;n(29)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7);n(29)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(29)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(29)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(105)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(106)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(76).set})},function(e,t,n){"use strict";var r=n(48),a={};a[n(8)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(107)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(7),a=n(21),i=n(8)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(109);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(110);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(5),a=n(18),i=n(24),o=n(78),s=n(27),u=n(6),l=n(41).f,d=n(20).f,c=n(11).f,f=n(49).trim,m=r.Number,_=m,h=m.prototype,p="Number"==i(n(40)(h)),y="trim"in String.prototype,v=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof m&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new _(v(t)),n,m):v(t)};for(var g,M=n(10)?l(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;M.length>L;L++)a(_,g=M[L])&&!a(m,g)&&c(m,g,d(_,g));m.prototype=h,h.constructor=m,n(15)(r,"Number",m)}},function(e,t,n){"use strict";var r=n(2),a=n(25),i=n(111),o=n(79),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},m=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},_=function(e,t,n){return 0===t?n:t%2==1?_(e,t-1,n*e):_(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(6)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*_(2,69,1))-69)<0?u*_(2,-t,1):u/_(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(_(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(6),i=n(111),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(112)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(112),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(110);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(109);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(113),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(80);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(81);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(114)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(6)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(113)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(80)})},function(e,t,n){var r=n(2),a=n(81),i=Math.exp;r(r.S+r.F*n(6)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(81),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(39),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(19),i=n(9);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(60)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(84),o="".endsWith;r(r.P+r.F*n(85)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(84);r(r.P+r.F*n(85)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(79)})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(84),o="".startsWith;r(r.P+r.F*n(85)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27);r(r.P+r.F*n(6)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(366);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(6),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(8)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(369))},function(e,t,n){"use strict";var r=n(4),a=n(27);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(59)})},function(e,t,n){"use strict";var r=n(23),a=n(2),i=n(12),o=n(115),s=n(86),u=n(9),l=n(87),d=n(88);a(a.S+a.F*!n(62)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),m="function"==typeof this?this:Array,_=arguments.length,h=_>1?arguments[1]:void 0,p=void 0!==h,y=0,v=d(f);if(p&&(h=r(h,_>2?arguments[2]:void 0,2)),null==v||m==Array&&s(v))for(n=new m(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=v.call(f),n=new m;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(87);r(r.S+r.F*n(6)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(19),i=[].join;r(r.P+r.F*(n(53)!=Object||!n(26)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(75),i=n(24),o=n(39),s=n(9),u=[].slice;r(r.P+r.F*n(6)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(117)}),n(35)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(90)}),n(35)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(30)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("find")},function(e,t,n){"use strict";var r=n(2),a=n(30)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)(i)},function(e,t,n){n(42)("Array")},function(e,t,n){var r=n(5),a=n(78),i=n(11).f,o=n(41).f,s=n(61),u=n(55),l=r.RegExp,d=l,c=l.prototype,f=/a/g,m=/a/g,_=new l(f)!==f;if(n(10)&&(!_||n(6)((function(){return m[n(8)("match")]=!1,l(f)!=f||l(m)==m||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(_?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(42)("RegExp")},function(e,t,n){"use strict";n(120);var r=n(4),a=n(55),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(6)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(4),a=n(9),i=n(93),o=n(63);n(64)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],m=0;null!==(c=o(u,l));){var _=String(c[0]);f[m]=_,""===_&&(u.lastIndex=i(l,a(u.lastIndex),d)),m++}return 0===m?null:f}]}))},function(e,t,n){"use strict";var r=n(4),a=n(12),i=n(9),o=n(25),s=n(93),u=n(63),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n(64)("replace",2,(function(e,t,n,_){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=_(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),m="function"==typeof t;m||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var v=[];;){var g=u(c,f);if(null===g)break;if(v.push(g),!p)break;""===String(g[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var M,L="",b=0,k=0;k=b&&(L+=f.slice(b,Y)+E,b=Y+w.length)}return L+f.slice(b)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=m;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(4),a=n(106),i=n(63);n(64)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(61),a=n(4),i=n(56),o=n(93),s=n(9),u=n(63),l=n(92),d=n(6),c=Math.min,f=[].push,m="length",_=!d((function(){RegExp(4294967295,"y")}));n(64)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[m]||2!="ab".split(/(?:ab)*/)[m]||4!=".".split(/(.?)(.?)/)[m]||".".split(/()()/)[m]>1||"".split(/.?/)[m]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,_=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[m]>1&&i.index=_));)h.lastIndex===i.index&&h.lastIndex++;return c===a[m]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[m]>_?u.slice(0,_):u}:"0".split(void 0,0)[m]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),m=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(_?"y":"g"),v=new m(_?l:"^(?:"+l.source+")",y),g=void 0===t?4294967295:t>>>0;if(0===g)return[];if(0===f.length)return null===u(v,f)?[f]:[];for(var M=0,L=0,b=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=A(e);if(i&&(t=M((function(){S?w.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||A(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},A=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){y.call(u,(function(){var t;S?w.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},C=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),H(t,!0))},N=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=O(e))?v((function(){var r={_w:n,_d:!1};try{t.call(e,l(N,r,1),l(C,r,1))}catch(e){C.call(r,e)}})):(n._v=e,n._s=1,H(n,!1))}catch(e){C.call({_w:n,_d:!1},e)}}};j||(D=function(e){_(this,D,"Promise","_h"),m(e),r.call(this);try{e(l(N,this,1),l(C,this,1))}catch(e){C.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(45)(D.prototype,{then:function(e,t){var n=E(p(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&H(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(N,e,1),this.reject=l(C,e,1)},g.f=E=function(e){return e===D||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!j,{Promise:D}),n(47)(D,"Promise"),n(42)("Promise"),o=n(22).Promise,c(c.S+c.F*!j,"Promise",{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!j),"Promise",{resolve:function(e){return b(s&&this===o?D:this,e)}}),c(c.S+c.F*!(j&&n(62)((function(e){D.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=E(t),r=n.resolve,a=n.reject,i=M((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=E(t),r=n.reject,a=M((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(127),a=n(46);n(66)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(67),i=n(97),o=n(4),s=n(39),u=n(9),l=n(7),d=n(5).ArrayBuffer,c=n(56),f=i.ArrayBuffer,m=i.DataView,_=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return _&&_(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(6)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new m(this),d=new m(i),_=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(20),a=n(21),i=n(18),o=n(2),s=n(7),u=n(4);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(20),a=n(2),i=n(4);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(21),i=n(4);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(4),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(129)})},function(e,t,n){var r=n(2),a=n(4),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(20),i=n(21),o=n(18),s=n(2),u=n(36),l=n(4),d=n(7);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,m=arguments.length<4?t:arguments[3],_=a.f(l(t),n);if(!_){if(d(f=i(t)))return e(f,n,s,m);_=u(0)}if(o(_,"value")){if(!1===_.writable||!d(m))return!1;if(c=a.f(m,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(m,n,c)}else r.f(m,n,u(0,s));return!0}return void 0!==_.set&&(_.set.call(m,s),!0)}})},function(e,t,n){var r=n(2),a=n(76);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(57)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(35)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(130),i=n(12),o=n(9),s=n(13),u=n(89);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(35)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(130),i=n(12),o=n(9),s=n(25),u=n(89);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(35)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(60)(!0),i=n(6)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(131),i=n(65),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(131),i=n(65),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(49)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(49)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(28),i=n(9),o=n(61),s=n(55),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(83)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(72)("asyncIterator")},function(e,t,n){n(72)("observable")},function(e,t,n){var r=n(2),a=n(129),i=n(19),o=n(20),s=n(87);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(132)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(132)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(68),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(68),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27),o=n(21),s=n(20).f;n(10)&&r(r.P+n(68),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(27),o=n(21),s=n(20).f;n(10)&&r(r.P+n(68),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(133)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(133)("Set")})},function(e,t,n){n(69)("Map")},function(e,t,n){n(69)("Set")},function(e,t,n){n(69)("WeakMap")},function(e,t,n){n(69)("WeakSet")},function(e,t,n){n(70)("Map")},function(e,t,n){n(70)("Set")},function(e,t,n){n(70)("WeakMap")},function(e,t,n){n(70)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(5)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(5)})},function(e,t,n){var r=n(2),a=n(24);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(135),i=n(114);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(135)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(22),i=n(5),o=n(56),s=n(122);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(96),i=n(121);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(32),a=n(4),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(32),a=n(4),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(32),a=n(4),i=n(21),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(125),a=n(134),i=n(32),o=n(4),s=n(21),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(32),a=n(4),i=n(21),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(32),a=n(4),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(95)(),i=n(5).process,o="process"==n(24)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(22),o=n(95)(),s=n(8)("observable"),u=n(13),l=n(4),d=n(43),c=n(45),f=n(14),m=n(44),_=m.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},v=function(e){y(e)||(e._o=void 0,p(e))},g=function(e,t){l(e),this._c=void 0,this._o=e,e=new M(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};g.prototype=c({},{unsubscribe:function(){v(this)}});var M=function(e){this._s=e};M.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{v(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new g(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(m(e,!1,(function(e){if(t.next(e),n)return _}))===_)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(94);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(91),a=n(38),i=n(15),o=n(5),s=n(14),u=n(50),l=n(8),d=l("iterator"),c=l("toStringTag"),f=u.Array,m={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_=a(m),h=0;h<_.length;h++){var p,y=_[h],v=m[y],g=o[y],M=g&&g.prototype;if(M&&(M[d]||s(M,d,f),M[c]||s(M,c,y),u[y]=f,v))for(p in r)M[p]||i(M,p,r[p],!0)}},function(e,t,n){(function(t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",u="object"==typeof e,l=t.regeneratorRuntime;if(l)u&&(e.exports=l);else{(l=t.regeneratorRuntime=u?e.exports:{}).wrap=h;var d={},c={};c[i]=function(){return this};var f=Object.getPrototypeOf,m=f&&f(f(T([])));m&&m!==n&&r.call(m,i)&&(c=m);var _=g.prototype=y.prototype=Object.create(c);v.prototype=_.constructor=g,g.constructor=v,g[s]=v.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(_),e},l.awrap=function(e){return{__await:e}},M(L.prototype),L.prototype[o]=function(){return this},l.AsyncIterator=L,l.async=function(e,t,n,r){var a=new L(h(e,t,n,r));return l.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},M(_),_[s]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;w(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new Y(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return D()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=b(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function v(){}function g(){}function M(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n1)for(var n=1;n=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(143);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r=n(506);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(508)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,n){(t=n(507)(!1)).push([e.i,".file-row td {\n padding: 0;\n border: none;\n vertical-align: middle;\n font-size: 0.9em;\n}\n\n.file-control-buttons {\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n}\n\n.file-control-buttons > button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > .status-icon {\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.uploaded-file > .cancel-button {\n position: absolute;\n left: 0;\n right: 0;\n top: 15px;\n bottom: 0;\n opacity: 0;\n}\n\n.uploaded-file:hover > .file-icon {\n opacity: 0.5;\n}\n\n.uploaded-file:hover > .cancel-button {\n opacity: 1.0;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.token-table td:nth-child(4) > i {\n padding-left: 10px;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-browser-restrictions {\n display: grid;\n grid-template-columns: repeat(4, auto);\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function g(e,t){var n,r,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=b.bind(null,n,o,!1),a=b.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),h(e,t),t}(t),r=w.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=k.bind(null,n),a=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=_(e,t);return m(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"createDownloadToken",value:function(e,t){return this.apiCall("file/createDownloadToken",{files:t,durability:e})}},{key:"createUploadToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return this.apiCall("file/createUploadToken",{parentId:t,durability:e,maxFiles:n,maxSize:r,extensions:a})}},{key:"createDirectory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/createDirectory",{name:e,parentId:t})}},{key:"moveFiles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/move",{id:e,parentId:t})}},{key:"rename",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.apiCall("file/rename",{id:e,name:t,token:n})}},{key:"getRestrictions",value:function(){return this.apiCall("file/getRestrictions")}},{key:"upload",value:(a=d(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,l,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:null,r=d.length>2&&void 0!==d[2]?d[2]:null,a=d.length>3&&void 0!==d[3]?d[3]:null,i=d.length>4&&void 0!==d[4]?d[4]:null,o=this.csrfToken(),(s=new FormData).append("file",t),o&&s.append("csrf_token",o),n&&s.append("token",n),r&&s.append("parentId",r),e.next=12,u.a.post("/api/file/upload",s,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:i||function(){},cancelToken:a.token});case 12:return l=e.sent,e.abrupt("return",l.data);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}])&&c(t.prototype,n),r&&c(t,r),e}();function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var b=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function k(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=b.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var w=[".DS_Store","Thumbs.db"];function Y(e){return(null!==e.target&&e.target.files?S(e.target.files):[]).map((function(e){return k(e)}))}function T(e,t){return g(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=S(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(x))]):[3,2];case 1:return[2,D(E(r.sent()))];case 2:return[2,D(S(e.files).map((function(e){return k(e)})))]}}))}))}function D(e){return e.filter((function(e){return-1===w.indexOf(e.name)}))}function S(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,R(n)];if(e.sizen)return[!1,R(n)]}return[!0,null]}function B(e){return null!=e}function V(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=C(U(e,n),1)[0],i=C(J(e,r,a),1)[0];return t&&i}))}function G(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function $(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function q(e){e.preventDefault()}function K(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Q(e){return-1!==e.indexOf("Edge/")}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return K(e)||Q(e)}function X(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ue=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ie(ie({},le),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,m=t.onDrop,_=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,v=t.noClick,g=t.noKeyboard,M=t.noDrag,L=t.noDragEventsBubbling,b=Object(r.useRef)(null),k=Object(r.useRef)(null),w=Object(r.useReducer)(fe,ce),Y=te(w,2),T=Y[0],D=Y[1],S=T.isFocused,x=T.isFileDialogActive,E=T.draggedFiles,j=Object(r.useCallback)((function(){k.current&&(D({type:"openDialog"}),k.current.value=null,k.current.click())}),[D]),O=function(){x&&setTimeout((function(){k.current&&(k.current.files.length||(D({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",O,!1),function(){window.removeEventListener("focus",O,!1)}}),[k,x,p]);var H=Object(r.useCallback)((function(e){b.current&&b.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),j()))}),[b,k]),P=Object(r.useCallback)((function(){D({type:"focus"})}),[]),A=Object(r.useCallback)((function(){D({type:"blur"})}),[]),F=Object(r.useCallback)((function(){v||(Z()?setTimeout(j,0):j())}),[k,v]),C=Object(r.useRef)([]),N=function(e){b.current&&b.current.contains(e.target)||(e.preventDefault(),C.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",q,!1),document.addEventListener("drop",N,!1)),function(){y&&(document.removeEventListener("dragover",q),document.removeEventListener("drop",N))}}),[b,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e),C.current=[].concat(ee(C.current),[e.target]),$(e)&&Promise.resolve(i(e)).then((function(t){G(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),R=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),re(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return $(e)&&f&&f(e),!1}),[f,L]),z=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e);var t=C.current.filter((function(e){return b.current&&b.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),C.current=t,t.length>0||(D({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),$(e)&&c&&c(e))}),[b,c,L]),B=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),re(e),C.current=[],$(e)&&Promise.resolve(i(e)).then((function(t){if(!G(e)||L){var r=[],a=[];t.forEach((function(e){var t=te(U(e,n),2),i=t[0],u=t[1],l=te(J(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[I]})})),r.splice(0)),D({acceptedFiles:r,fileRejections:a,type:"setFiles"}),m&&m(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&_&&_(r,e)}})),D({type:"reset"})}),[u,n,s,o,l,i,m,_,h,L]),K=function(e){return a?null:e},Q=function(e){return g?null:K(e)},ne=function(e){return M?null:K(e)},re=function(e){L&&e.stopPropagation()},ae=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=se(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return ie(ie(oe({onKeyDown:Q(X(r,H)),onFocus:Q(X(i,P)),onBlur:Q(X(o,A)),onClick:K(X(s,F)),onDragEnter:ne(X(u,W)),onDragOver:ne(X(l,R)),onDragLeave:ne(X(d,z)),onDrop:ne(X(c,B))},n,b),a||g?{}:{tabIndex:0}),f)}}),[b,H,P,A,F,W,R,z,B,g,M,a]),ue=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),de=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=se(e,["refKey","onChange","onClick"]),s=oe({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:K(X(a,B)),onClick:K(X(i,ue)),autoComplete:"off",tabIndex:-1},r,k);return ie(ie({},s),o)}}),[k,n,u,B,a]),me=E.length,_e=me>0&&V({files:E,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=me>0&&!_e;return ie(ie({},T),{},{isDragAccept:_e,isDragReject:he,isFocused:S&&!a,getRootProps:ae,getInputProps:de,rootRef:b,inputRef:k,open:K(j)})}(se(e,["children"])),o=i.open,s=se(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(ie(ie({},s),{},{open:o})))}));ue.displayName="Dropzone";var le={disabled:!1,getFilesFromEvent:function(e){return g(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?T(e.dataTransfer,e.type):Y(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};ue.defaultProps=le,ue.propTypes={children:v.a.func,accept:v.a.oneOfType([v.a.string,v.a.arrayOf(v.a.string)]),multiple:v.a.bool,preventDropOnDocument:v.a.bool,noClick:v.a.bool,noKeyboard:v.a.bool,noDrag:v.a.bool,noDragEventsBubbling:v.a.bool,minSize:v.a.number,maxSize:v.a.number,maxFiles:v.a.number,disabled:v.a.bool,getFilesFromEvent:v.a.func,onFileDialogCancel:v.a.func,onDragEnter:v.a.func,onDragLeave:v.a.func,onDragOver:v.a.func,onDrop:v.a.func,onDropAccepted:v.a.func,onDropRejected:v.a.func};var de=ue,ce={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function fe(e,t){switch(t.type){case"focus":return ie(ie({},e),{},{isFocused:!0});case"blur":return ie(ie({},e),{},{isFocused:!1});case"openDialog":return ie(ie({},e),{},{isFileDialogActive:!0});case"closeDialog":return ie(ie({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ie(ie({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ie(ie({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ie(ie({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function me(e){var t=e.onClose||null,n=e.title||"Untitled Alert",r=e.message||"Alert message",i=e.type||"danger",o="ban";return"warning"===i?o="exclamation-triangle":"success"===i&&(o="check"),a.a.createElement("div",{className:"alert alert-"+i+" alert-dismissible"},t?a.a.createElement("button",{type:"button",className:"close","data-dismiss":"alert","aria-hidden":"true",onClick:t},"×"):null,a.a.createElement("h5",null,a.a.createElement(p,{icon:o,className:"icon"})," ",n),r)}function _e(e){for(var t=e.buttons||["Ok","Cancel"],n=e.onClick||function(){},r=!!e.visible,i=e.title||"Popup Title",o=e.onClose||function(){},s=[],u=["primary","secondary","success","warning","danger"],l=function(e){var r=t[e],i=u[e%u.length];s.push(a.a.createElement("button",{key:"btn-"+e,type:"button",className:"btn btn-"+i,"data-dismiss":"modal",onClick:function(){return n(r)}},r))},d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:a/2,x2:n,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:a/2,x2:n,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t;return r.createElement("svg",{key:e,width:n,height:a,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2x",n="";if(e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=Me(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(p,{icon:n,type:"far",className:"p-1 align-middle file-icon fa-"+t})}function w(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return 0===n||Math.round(e)===e?e+" "+t[n]:e.toFixed(1)+" "+t[n]}function Y(e){if("directory"===e.toLowerCase())return"Directory";switch(e.toLowerCase()){case"image/jpeg":return"JPEG-Image";case"image/png":return"PNG-Image";case"application/pdf":return"PDF-Document";case"text/plain":return"Text-Document";case"application/x-dosexec":return"Windows Executable";case"application/vnd.oasis.opendocument.text":return"OpenOffice-Document";default:return e}}Object(r.useEffect)((function(){for(var e=v.slice(),t=0;t0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=[];n=n||t;for(var i=0,o=Object.values(n);i=0&&e<_.length){var t=_.slice();t.splice(e,1),h(t)}}(e)}})))},H=0;H<_.length;H++)O(H);for(var P=[],A=0,F=Object.entries(s);A1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=.45,l="lg",d=Object.values(t),c=function(){var t=m[f],c=t.name,_=t.uid,h=t.isDirectory?"Directory":t.mimeType,y=t.isDirectory?"":w(t.size),v=t.isDirectory?"application/x-directory":t.mimeType,g=a&&a.valid?"&token="+a.value:"",T=[];if(n>0){for(var D=0;D=100;E.push(r.createElement("span",{className:"uploaded-file",key:e},k(n.type,"3x"),r.createElement("span",null,n.name),i?r.createElement(r.Fragment,null):r.createElement("div",{className:"progress border border-primary position-relative"},r.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100",style:{width:a+"%"}}),r.createElement("span",{className:"justify-content-center d-flex position-absolute w-100",style:{top:"7px"}},a+"%")),r.createElement(p,{icon:i?n.success?"check":"times":"spinner",className:"status-icon "+(i?n.success?"text-success":"text-danger":"text-secondary")}),r.createElement(p,{icon:"times",className:"text-danger cancel-button fa-2x",title:"Cancel Upload",onClick:function(t){return function(e,t){e.stopPropagation(),e.preventDefault();var n=v[t].cancelToken;n&&v[t].progress<1&&n.cancel("Upload cancelled");var r=v.slice();r.splice(t,1),g(r)}(t,e)}})))},I=0;I0&&K({msg:"The following files could not be uploaded due to given restrictions: "+t.map((function(e){return e.file.name})).join(", ")},"Cannot upload file"),e&&e.length>0){var n=v.slice();n.push.apply(n,ge(e)),g(n)}}},{accept:(l.extensions||"").split(",").map((function(e){return e.trim()})).map((function(e){return!e.startsWith(".")&&e.length>0?"."+e:e})).join(","),maxFiles:l.maxFiles,maxSize:l.maxSize}),(function(e){var t=e.getRootProps,n=e.getInputProps;return r.createElement("section",{className:"file-upload-container"},r.createElement("div",t(),r.createElement("input",n()),r.createElement("p",null,"Drag 'n' drop some files here, or click to select files"),0===E.length?r.createElement(p,{className:"mx-auto fa-3x text-black-50",icon:"upload"}):r.createElement("div",null,E)))})))}var U,J;return r.createElement(r.Fragment,null,r.createElement("h4",null,r.createElement(p,{icon:"sync",className:"mx-3 clickable small",onClick:q}),"File Browser"),r.createElement("table",{className:"table data-table file-table"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null),r.createElement("th",null,"Name"),r.createElement("th",null,"Type"),r.createElement("th",null,"Size"),r.createElement("th",null))),r.createElement("tbody",null,R.length>0?R:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No files uploaded yet")))),r.createElement("div",{className:"file-control-buttons"},r.createElement("button",{type:"button",className:"btn btn-success",disabled:0===D,style:x?{}:{gridColumnStart:1,gridColumnEnd:3,width:"40%",margin:"0 auto"},onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?"":"&token="+a.value,r=e.map((function(e){return"id[]="+e})).join("&");fetch("/api/file/download?"+r+t).then((function(e){var t=(e.headers.get("Content-Disposition")||"").split(";").filter((function(e){return e.trim().toLowerCase().startsWith("filename=")})),n=null;n=t.length>0?t[0].trim().substr("filename=".length):null,e.blob().then((function(e){var t=window.URL.createObjectURL(e),r=document.createElement("a");r.href=t,null!==n&&(r.download=n),r.click()}))}))}}(T)}},r.createElement(p,{icon:"download",className:"mr-1"}),"Download Selected Files (",D,")"),x?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===D,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?null:a.value;n.delete(e,t).then((function(e){e.success?q():K(e)}))}}(T)}},r.createElement(p,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",D,")"),n.loggedIn?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(e){return B("createDirectory")}},r.createElement(p,{icon:"plus",className:"mr-1"}),"Create Directory"),r.createElement("button",{type:"button",className:"btn btn-primary",disabled:0===D,onClick:function(e){return B("moveFiles")}},r.createElement(p,{icon:"plus",className:"mr-1"}),"Move Selected Files (",D,")")):r.createElement(r.Fragment,null)):r.createElement(r.Fragment,null)),S,r.createElement("div",{className:"file-browser-restrictions px-4 mb-4"},r.createElement("b",null,"Restrictions:"),r.createElement("span",null,"Max. Files: ",l.maxFiles),r.createElement("span",null,"Max. Filesize: ",w(l.maxSize)),r.createElement("span",null,l.extensions?"Allowed extensions: "+l.extensions:"All extensions allowed")),r.createElement("div",null,j),(U="",J=[],"createDirectory"!==c.type&&"moveFiles"!==c.type||J.push(r.createElement("div",{className:"form-group",key:"select-directory"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:c.directory,className:"form-control",onChange:function(e){return G(e,"directory")}},P))),"createDirectory"!==c.type&&"rename"!==c.type||J.push(r.createElement("div",{className:"form-group",key:"input-name"},r.createElement("label",null,"createDirectory"===c.type?"Create Directory":"New Name"),r.createElement("input",{type:"text",className:"form-control",value:c.name,maxLength:32,placeholder:"Enter name…",onChange:function(e){return G(e,"name")}}))),"createDirectory"===c.type?U="Create Directory":"moveFiles"===c.type?U="Move Files":"rename"===c.type&&(U="Rename File or Directory"),r.createElement(_e,{title:U,visible:c.visible,buttons:["Ok","Cancel"],onClose:V,onClick:$},J)));function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;f(pe(pe({},c),{},{visible:!0,type:e,target:t}))}function V(){f(pe(pe({},c),{},{visible:!1}))}function G(e,t){f(pe(pe({},c),{},ye({},t,e.target.value)))}function $(e){if("Ok"===e){var t=0===c.directory?null:c.directory;"createDirectory"===c.type?n.createDirectory(c.name,t).then((function(e){e.success?q():K(e,"Error creating directory")})):"moveFiles"===c.type?n.moveFiles(T,t).then((function(e){e.success?q():K(e,"Error moving files")})):"rename"===c.type&&n.rename(c.target,c.name,a.valid?a.value:null).then((function(e){e.success?q():K(e,"Error renaming file or directory")}))}V()}function q(){var e;if(a.valid)e=n.validateToken(a.value);else{if(!n.loggedIn)return;e=n.listFiles()}e.then((function(e){var t;e?(o(e.files),(t=v.filter((function(e){return!e.progress||e.progress<1}))).length!==v.length&&g(t)):K(e)}))}function K(e,t){var n=_.slice();n.push({type:"danger",message:e.msg,title:t}),h(n)}function Q(e){var t=n.loggedIn?null:a.value,r=n.loggedIn&&0!==c.directory?c.directory:null,i=v[e],o=u.a.CancelToken.source(),s=v.slice();s[e].cancelToken=o,s[e].progress=0,g(s),n.upload(i,t,r,o,(function(t){return function(e,t){if(t=e.total?1:e.loaded/e.total,g(n)}}(t,e)})).then((function(t){var n=v.slice();n[e].success=t.success,g(n),t.success?q():K(t)})).catch((function(e){e&&"Upload cancelled"!==e.message&&K({msg:e},"Error uploading files")}))}}var we=n(1),Ye=n.n(we),Te="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),De=new Uint8Array(16);function Se(){if(!Te)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Te(De)}for(var xe=[],Ee=0;Ee<256;++Ee)xe[Ee]=(Ee+256).toString(16).substr(1);var je=function(e,t){var n=t||0,r=xe;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var Oe=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||Se)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var i=0;i<16;++i)t[r+i]=a[i];return t||je(a)};function He(e,t){for(var n=0;nM},S=function(e){return function(e){var t=p[e].b;return h+t+g}(e)>L},x=function(e){return function(e){return Y(e)<0}(e)||D(e)||function(e){return T(e)<0}(e)||S(e)},E=function(e){return!x(e)},j=["top","bottom","left","right"],O=[],H=0;H<4;H++){var P=j[H];E(P)&&O.push(P)}var A,F=!1,C=a!==r;return E(a)&&C?(F=!0,A=a):O.length>0&&x(a)&&x(r)&&(F=!0,A=O[0]),F?{isNewState:!0,newState:{place:A}}:{isNewState:!1,position:{left:parseInt(Y(r)-w,10),top:parseInt(T(r)-k,10)}}}var Qe=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},Ze=function(e,t,n){var r=t.getBoundingClientRect(),a=r.top,i=r.left,o=Qe(t),s=o.width,u=o.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+s/2,mouseY:a+u/2}},Xe=function(e,t,n,r,a){var i,o,s,u;return"float"===e?(i={l:-r/2,r:r/2,t:-(a+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:a+3+2+12},u={l:-(r+3+2),r:-3,t:-a/2,b:a/2},o={l:3,r:r+3+2,t:-a/2,b:a/2}):"solid"===e&&(i={l:-r/2,r:r/2,t:-(n/2+a+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+a+2},u={l:-(r+t/2+2),r:-t/2,t:-a/2,b:a/2},o={l:t/2,r:r+t/2+2,t:-a/2,b:a/2}),{top:i,bottom:s,left:u,right:o}},et=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffsetX:t,extraOffsetY:n}},tt=function(e){for(var t=e;t;){var n=window.getComputedStyle(t);if("none"!==n.getPropertyValue("transform")||"transform"===n.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function nt(e,t,n,r){if(t)return t;if(null!=n)return n;if(null===n)return null;var i=//;return r&&"false"!==r&&i.test(e)?e.split(i).map((function(e,t){return a.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function rt(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}function at(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var it,ot,st,ut={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};function lt(e,t,n,r){return function(e,t){var n=t.text,r=t.background,a=t.border,i=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(n,";\n\t background: ").concat(r,";\n\t border: 1px solid ").concat(a,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(a,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(i,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(a,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(i,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(a,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(i,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(a,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(i,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,n){var r=e.text,a=e.background,i=e.border,o=e.arrow?e.arrow:e.background,s=function(e){return ut[e]?Ne({},ut[e]):void 0}(t);r&&(s.text=r);a&&(s.background=a);n&&(s.border=i||("light"===t?"black":"white"));o&&(s.arrow=o);return s}(t,n,r))}var dt,ct=function(e){e.hide=function(e){Ue(Ie.HIDE,{target:e})},e.rebuild=function(){Ue(Ie.REBUILD)},e.show=function(e){Ue(Ie.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.showTooltip({currentTarget:t&&e.detail.target},!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(it=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(Ie.HIDE,this.globalHide),window.addEventListener(Ie.HIDE,this.globalHide,!1),window.removeEventListener(Ie.REBUILD,this.globalRebuild),window.addEventListener(Ie.REBUILD,this.globalRebuild,!1),window.removeEventListener(Ie.SHOW,this.globalShow),window.addEventListener(Ie.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(Ie.HIDE,this.globalHide),window.removeEventListener(Ie.REBUILD,this.globalRebuild),window.removeEventListener(Ie.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(it=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,a=n.eventOff,i=e.getAttribute("data-event")||r,o=e.getAttribute("data-event-off")||a;i.split(" ").forEach((function(n){e.removeEventListener(n,Ve.get(e,n));var r=Je.bind(t,o);Ve.set(e,n,r),e.addEventListener(n,r,!1)})),o&&o.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,a=n||e.getAttribute("data-event"),i=r||e.getAttribute("data-event-off");e.removeEventListener(a,Ve.get(e,n)),i&&e.removeEventListener(i,this.hideTooltip)}}(it=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(it=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(it=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,a=n.eventOff,i=n.possibleCustomEvents,o=n.possibleCustomEventsOff,s=qe(),u=$e(e,"data-event"),l=$e(e,"data-event-off");null!=r&&(u[r]=!0),null!=a&&(l[a]=!0),i.split(" ").forEach((function(e){return u[e]=!0})),o.split(" ").forEach((function(e){return l[e]=!0})),this.unbindBodyListener(s);var d=this.bodyModeListeners={};for(var c in null==r&&(d.mouseover=Ge.bind(this,this.showTooltip,{}),d.mousemove=Ge.bind(this,this.updateTooltip,{respectEffect:!0}),d.mouseout=Ge.bind(this,this.hideTooltip,{})),u)d[c]=Ge.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||a;Je.call(t,n,e)}),{customEvent:!0});for(var f in l)d[f]=Ge.bind(this,this.hideTooltip,{customEvent:!0});for(var m in d)s.addEventListener(m,d[m])},e.prototype.unbindBodyListener=function(e){e=e||qe();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((st=ot=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=ze(this,We(t).call(this,e))).state={uuid:e.uuid||"t"+Oe(),place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,customColors:{},offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:rt(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(t,e),Pe(t,null,[{key:"propTypes",get:function(){return{uuid:v.a.string,children:v.a.any,place:v.a.string,type:v.a.string,effect:v.a.string,offset:v.a.object,multiline:v.a.bool,border:v.a.bool,textColor:v.a.string,backgroundColor:v.a.string,borderColor:v.a.string,arrowColor:v.a.string,insecure:v.a.bool,class:v.a.string,className:v.a.string,id:v.a.string,html:v.a.bool,delayHide:v.a.number,delayUpdate:v.a.number,delayShow:v.a.number,event:v.a.string,eventOff:v.a.string,isCapture:v.a.bool,globalEventOff:v.a.string,getContent:v.a.any,afterShow:v.a.func,afterHide:v.a.func,overridePosition:v.a.func,disable:v.a.bool,scrollHide:v.a.bool,resizeHide:v.a.bool,wrapper:v.a.string,bodyMode:v.a.bool,possibleCustomEvents:v.a.string,possibleCustomEventsOff:v.a.string,clickable:v.a.bool}}}]),Pe(t,[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t),this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var e=this.props.id,t=this.getTargetArray(e),n=[];if(t.forEach((function(e){for(var t=e.parentNode;t.parentNode&&!t.host;)t=t.parentNode;var r=t.querySelector("head");n.push(r||t)})),n.length){var r=document.createElement("style");r.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',r.setAttribute("data-react-tooltip","true"),n.filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(e){e.querySelector("style[data-react-tooltip]")||e.appendChild(r)}))}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n=[];if(e){var r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t='[data-tip][data-for="'.concat(r,'"]')}else t="[data-tip]:not([data-for])";return at(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(at(e.shadowRoot.querySelectorAll(t)))})),n.concat(at(document.querySelectorAll(t)))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,a=t.isCapture,i=this.getTargetArray(n);i.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(i):i.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,a)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),nt(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(this.tooltipRef){if(t&&!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget})))return;var n=this.props,r=n.multiline,a=n.getContent,i=e.currentTarget.getAttribute("data-tip"),o=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,u=!0;e.currentTarget.getAttribute("data-scroll-hide")?u="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(u=this.props.scrollHide);var l=e.currentTarget.getAttribute("data-place")||this.props.place||"top",d=s?"solid":this.getEffect(e.currentTarget),c=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},f=Ke(e,e.currentTarget,this.tooltipRef,l,l,d,c);f.position&&this.props.overridePosition&&(f.position=this.props.overridePosition(f.position,e,e.currentTarget,this.tooltipRef,l,l,d,c));var m=f.isNewState?f.newState.place:l;this.clearTimer();var _=e.currentTarget,h=this.state.show?_.getAttribute("data-delay-update")||this.props.delayUpdate:0,p=this,y=function(){p.setState({originTooltip:i,isMultiline:o,desiredPlace:l,place:m,type:_.getAttribute("data-type")||p.props.type||"dark",customColors:{text:_.getAttribute("data-text-color")||p.props.textColor||null,background:_.getAttribute("data-background-color")||p.props.backgroundColor||null,border:_.getAttribute("data-border-color")||p.props.borderColor||null,arrow:_.getAttribute("data-arrow-color")||p.props.arrowColor||null},effect:d,offset:c,html:(_.getAttribute("data-html")?"true"===_.getAttribute("data-html"):p.props.html)||!1,delayShow:_.getAttribute("data-delay-show")||p.props.delayShow||0,delayHide:_.getAttribute("data-delay-hide")||p.props.delayHide||0,delayUpdate:_.getAttribute("data-delay-update")||p.props.delayUpdate||0,border:(_.getAttribute("data-border")?"true"===_.getAttribute("data-border"):p.props.border)||!1,extraClass:_.getAttribute("data-class")||p.props.class||p.props.className||"",disable:(_.getAttribute("data-tip-disable")?"true"===_.getAttribute("data-tip-disable"):p.props.disable)||!1,currentTarget:_},(function(){u&&p.addScrollListener(p.state.currentTarget),p.updateTooltip(e),a&&Array.isArray(a)&&(p.intervalUpdateContent=setInterval((function(){if(p.mount){var e=p.props.getContent,t=nt(i,"",e[0](),o),n=p.isEmptyTip(t);p.setState({isEmptyTip:n}),p.updatePosition()}}),a[1]))}))};h?this.delayReshow=setTimeout(y,h):y()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,a=n.disable,i=this.props.afterShow,o=this.getTooltipContent(),s=parseInt(r,10),u=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(o)&&!a){var l=function(){if(Array.isArray(o)&&o.length>0||o){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:u,show:!0},(function(){t.updatePosition(),n&&i&&i(e)}))}};clearTimeout(this.delayShowLoop),r?this.delayShowLoop=setTimeout(l,s):l()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},a=this.state.disable,i=r.isScroll,o=i?0:this.state.delayHide,s=this.props.afterHide,u=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(u)&&!a){if(t){var l=this.getTargetArray(this.props.id),d=l.some((function(t){return t===e.currentTarget}));if(!d||!this.state.show)return}var c=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(n.state.currentTarget),t&&s&&s(e)})))};this.clearTimer(),o?this.delayHideLoop=setTimeout(c,parseInt(o,10)):c()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(e){var t=this.isCapture(e);window.removeEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,a=t.place,i=t.desiredPlace,o=t.effect,s=t.offset,u=this.tooltipRef,l=Ke(n,r,u,a,i,o,s);if(l.position&&this.props.overridePosition&&(l.position=this.props.overridePosition(l.position,n,r,u,a,i,o,s)),l.isNewState)return this.setState(l.newState,(function(){e.updatePosition()}));u.style.left=l.position.left+"px",u.style.top=l.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"hasCustomColors",value:function(){var e=this;return Boolean(Object.keys(this.state.customColors).find((function(t){return"border"!==t&&e.state.customColors[t]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var e=this,n=this.state,r=n.extraClass,i=n.html,o=n.ariaProps,s=n.disable,u=this.getTooltipContent(),l=this.isEmptyTip(u),d=lt(this.state.uuid,this.state.customColors,this.state.type,this.state.border),c="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||s||l?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),f=this.props.wrapper;t.supportedWrappers.indexOf(f)<0&&(f=t.defaultProps.wrapper);var m=[c,r].filter(Boolean).join(" ");if(i){var _="".concat(u,"\n");return a.a.createElement(f,Fe({className:"".concat(m),id:this.props.id,ref:function(t){return e.tooltipRef=t}},o,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:_}}))}return a.a.createElement(f,Fe({className:"".concat(m),id:this.props.id},o,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),a.a.createElement("style",{dangerouslySetInnerHTML:{__html:d}}),u)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=rt(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?Ne({},t,{ariaProps:r}):null}}]),t}(a.a.Component),Ae(ot,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),Ae(ot,"supportedWrappers",["div","span"]),Ae(ot,"displayName","ReactTooltip"),(dt=it=st).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||vt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(e,t){if(e){if("string"==typeof e)return gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e0?g:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No active tokens connected with this account")))),r.createElement("div",null,r.createElement("button",{type:"button",className:"btn btn-success m-2",onClick:function(){y(mt(mt({},h),{},{visible:!0}))}},r.createElement(p,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,b),r.createElement(_e,{title:"Create Token",visible:h.visible,buttons:["Ok","Cancel"],onClose:O,onClick:function(e){if("Ok"===e){var r=h.durability,a=0===r?null:Ye()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");if("download"===h.tokenType)t.createDownloadToken(r,n).then((function(e){if(e.success){var t=o.slice();t.push({token:e.token,valid_until:a,type:"download"}),s(t)}else j(e,"Error creating token")}));else if("upload"===h.tokenType){var i=0===h.directory?null:h.directory;t.createUploadToken(r,i,h.maxFiles,h.maxSize,h.extensions).then((function(e){if(e.success){var t=o.slice();t.push({uid:e.tokenId,token:e.token,valid_until:a,type:"upload"}),s(t)}else j(e,"Error creating token")}))}}O()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Durability in minutes (0 = forever):"),r.createElement("input",{type:"number",min:0,className:"form-control",value:h.durability,onChange:function(e){return H(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:h.tokenType,className:"form-control",onChange:function(e){return H(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===h.tokenType?r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:h.directory,className:"form-control",onChange:function(e){return H(e,"directory")}},Y)),r.createElement("b",null,"Upload Restrictions:"),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Files (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:25,className:"form-control",value:h.maxFiles,onChange:function(e){return H(e,"maxFiles")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Size per file in MB (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:10,className:"form-control",value:h.maxSize,onChange:function(e){return H(e,"maxSize")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Allowed Extensions:"),r.createElement("input",{type:"text",placeholder:"(no restrictions)",maxLength:256,className:"form-control",value:h.extensions,onChange:function(e){return H(e,"extensions")}}))):r.createElement(r.Fragment,null)));function j(e,t){var n=l.slice();n.push({type:"danger",message:e.msg,title:t}),d(n)}function O(){y(mt(mt({},h),{},{visible:!1}))}function H(e,t){y(mt(mt({},h),{},_t({},t,e.target.value)))}}function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e){return function(e){if(Array.isArray(e))return kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={};t=t||this.state.files,"/"===e&&(n[0]="/");for(var r=0,a=Object.values(t);r1?"/":"")+i.name;n[i.uid]=o,n=Object.assign(n,Yt({},this.getDirectories(o,i.items)))}}return n}},{key:"getSelectedIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?Yt({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Yt(Yt({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Yt(Yt({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Yt(Yt({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files,r.restrictions=n.restrictions):(r.token.value=r.token.value?"":t,r.errorMessage=n.msg),e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Yt(Yt({},this.state),{},{token:Yt(Yt({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.getSelectedIds(),i=this.getDirectories(),o=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(Mt,{api:this.api,selectedFiles:r,directories:i}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(ke,{files:this.state.files,token:this.state.token,api:this.api,restrictions:this.state.restrictions,directories:i,onSelectFile:this.onSelectFile.bind(this),onFetchFiles:this.onFetchFiles.bind(this)}))),o))}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(p,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage),a.a.createElement("div",{className:"mt-3"},"Or either ",a.a.createElement("a",{href:"/admin"},"login")," to access the file control panel."))))}var s=!0,u=window.location.pathname;if(u.startsWith("/files")&&(u=u.substr("/files".length)),u.length>1){var l=u.endsWith("/")?u.length-2:u.length-1,d=u.startsWith("/files/")?"/files/".length:1,c=u.substr(d,l);c&&(this.onValidateToken(c),s=!1)}return s&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Yt(Yt({},e.state),{},{loaded:!0,user:e.api.user,files:t.files})),e.api.getRestrictions().then((function(t){e.setState(Yt(Yt({},e.state),{},{restrictions:t.restrictions}))}))})):e.setState(Yt(Yt({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(p,{icon:"spinner"}))}}])&&Dt(t.prototype,n),r&&Dt(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Ot,null),document.getElementById("root"))}]); \ No newline at end of file