From c847650b1f66dd713d0b1d5eac01fa7ca652b12e Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 30 Mar 2021 23:00:34 +0200 Subject: [PATCH] php upload restrictions --- core/Api/FileAPI.class.php | 54 ++++++++++++++++++- fileControlPanel/.idea/misc.xml | 6 +++ .../src/elements/file-browser.css | 5 +- fileControlPanel/src/elements/file-browser.js | 44 ++++++++++++--- js/files.min.js | 2 +- 5 files changed, 96 insertions(+), 15 deletions(-) create mode 100644 fileControlPanel/.idea/misc.xml diff --git a/core/Api/FileAPI.class.php b/core/Api/FileAPI.class.php index 39a9ff2..6498e44 100644 --- a/core/Api/FileAPI.class.php +++ b/core/Api/FileAPI.class.php @@ -150,6 +150,32 @@ namespace Api { ->where(new CondNull("valid_until"), new Compare("valid_until", $sql->now(), ">=")); } } + + private static function unitToBytes($var) : int { + if (is_int($var) || is_numeric($var)) { + return intval($var); + } else { + preg_match("/(\\d+)([KMG])/", $var, $re); + if ($re) { + $units = ["K","M","G"]; + $value = intval($re[1]); + $unitIndex = array_search($re[2], $units); + return $value * pow(1024, $unitIndex + 1); + } else { + return -1; // some weird error here + } + } + } + + protected function getMaxFileSizePHP() : int { + $uploadMaxFilesize = $this->unitToBytes(ini_get("upload_max_filesize")); + $postMaxSize = $this->unitToBytes(ini_get("post_max_size")); + return min($uploadMaxFilesize, $postMaxSize); + } + + protected function getMaxFiles() : int { + return intval(ini_get("max_file_uploads")); + } } } @@ -204,9 +230,12 @@ namespace Api\File { $this->result["files"] = $this->createFileList($res); if ($row["token_type"] === "upload") { + $maxFiles = ($row["maxFiles"] ?? 0); + $maxSize = ($row["maxSize"] ?? 0); + $this->result["restrictions"] = array( - "maxFiles" => $row["maxFiles"] ?? 0, - "maxSize" => $row["maxSize"] ?? 0, + "maxFiles" => ($maxFiles <= 0 ? $this->getMaxFiles() : min($this->getMaxFiles(), $maxFiles)), + "maxSize" => ($maxSize <= 0 ? $this->getMaxFileSizePHP() : min($this->getMaxFileSizePHP(), $maxSize)), "extensions" => $row["extensions"] ?? "", "parentId" => $row["parentId"] ?? 0 ); @@ -218,6 +247,27 @@ namespace Api\File { } } + class GetRestrictions extends FileAPI { + public function __construct(User $user, bool $externalCall = false) { + parent::__construct($user, $externalCall, array()); + $this->csrfTokenRequired = false; + $this->loginRequired = true; + } + + public function execute($values = array()) { + if (!parent::execute($values)) { + return false; + } + + $this->result["restrictions"] = array( + "maxFiles" => $this->getMaxFiles(), + "maxSize" => $this->getMaxFileSizePHP() + ); + + return true; + } + } + class RevokeToken extends FileAPI { public function __construct(User $user, bool $externalCall = false) { parent::__construct($user, $externalCall, array( diff --git a/fileControlPanel/.idea/misc.xml b/fileControlPanel/.idea/misc.xml new file mode 100644 index 0000000..039e6a7 --- /dev/null +++ b/fileControlPanel/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/fileControlPanel/src/elements/file-browser.css b/fileControlPanel/src/elements/file-browser.css index 2d1d6ed..3b14acf 100644 --- a/fileControlPanel/src/elements/file-browser.css +++ b/fileControlPanel/src/elements/file-browser.css @@ -2,6 +2,7 @@ padding: 0; border: none; vertical-align: middle; + font-size: 0.9em; } .file-control-buttons { @@ -60,8 +61,4 @@ .file-table td:nth-child(n+3), .file-table th:nth-child(n+3) { text-align: center; -} - -.file-table tr, .file-table td { - height: 40px; } \ No newline at end of file diff --git a/fileControlPanel/src/elements/file-browser.js b/fileControlPanel/src/elements/file-browser.js index 3c13ede..eda56e6 100644 --- a/fileControlPanel/src/elements/file-browser.js +++ b/fileControlPanel/src/elements/file-browser.js @@ -57,7 +57,7 @@ export function FileBrowser(props) { ; } - function createFileIcon(mimeType, size=2) { + function createFileIcon(mimeType, size="2x") { let icon = ""; if (mimeType !== null) { mimeType = mimeType.toLowerCase().trim(); @@ -92,7 +92,7 @@ export function FileBrowser(props) { icon = "file" + (icon ? ("-" + icon) : icon); } - return + return } function formatSize(size) { @@ -134,9 +134,37 @@ export function FileBrowser(props) { return ids; } + // TODO: add more mime type names or use an directory here? + function getTypeName(type) { + if (type.toLowerCase() === "directory") { + return "Directory"; + } + + switch (type.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 type; + } + } + function createFileList(elements, indentation=0) { let rows = []; let i = 0; + + const scale = 0.45; + const iconSize = "lg"; + const values = Object.values(elements); for (const fileElement of values) { let name = fileElement.name; @@ -148,13 +176,13 @@ export function FileBrowser(props) { let svg = []; if (indentation > 0) { for (let i = 0; i < indentation - 1; i++) { - svg.push(svgLeft(0.75)); + svg.push(svgLeft(scale)); } if (i === values.length - 1) { - svg.push(svgEnd(0.75)); + svg.push(svgEnd(scale)); } else { - svg.push(svgMiddle(0.75)); + svg.push(svgMiddle(scale)); } } @@ -162,14 +190,14 @@ export function FileBrowser(props) { { svg } - { createFileIcon(mimeType) } + { createFileIcon(mimeType, iconSize) } {fileElement.isDirectory ? name : {name} } - {type} + {getTypeName(type)} {size} - { createFileIcon(file.type, 3) } + { createFileIcon(file.type, "3x") } {file.name} onRemoveUploadedFile(e, i)}/> diff --git a/js/files.min.js b/js/files.min.js index 6a68474..c30ff0c 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,H=null,O=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,w(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=O;try{for(C(n),H=T(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===T(x)&&D(x),C(n)}else D(x);H=T(x)}if(null!==H)var l=!0;else{var d=T(E);null!==d&&a(N,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function R(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||P||(A=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(E,e),null===T(x)&&e===T(E)&&(F?i():F=!0,a(N,u-s))):(e.sortIndex=o,w(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!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(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=H(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=H(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((O=function(){if(this instanceof O)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),B(this,e,k(1,n))};return i&&V&&B(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,D.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),_.f=function(e){return G(m(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});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]=O(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(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?Y(e):q(Y(e),t)},defineProperty:K,defineProperties:q,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=O();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)}}),O.prototype[C]||n(14)(O.prototype,C,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);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(39)})},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(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(28)("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(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),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(105)})},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(20),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(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(5),a=n(17),i=n(23),o=n(76),s=n(26),u=n(6),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,m=r.Number,_=m,h=m.prototype,p="Number"==i(n(39)(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(24),i=n(109),o=n(77),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(109),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(110)})},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(110),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(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),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(78);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(79);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(112)})},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(111)})},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(78)})},function(e,t,n){var r=n(2),a=n(79),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(79),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(38),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(18),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(58)(!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(82),o="".endsWith;r(r.P+r.F*n(83)("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(82);r(r.P+r.F*n(83)("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(77)})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("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(26);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(356);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(359))},function(e,t,n){"use strict";var r=n(4),a=n(26);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(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(9),l=n(85),d=n(86);a(a.S+a.F*!n(60)((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(85);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(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(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(73),i=n(23),o=n(38),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(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(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(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(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(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(5),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),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(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(4),a=n(53),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(91),o=n(61);n(62)("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(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n(62)("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,w)+E,b=w+Y.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(104),i=n(61);n(62)("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(59),a=n(4),i=n(54),o=n(91),s=n(9),u=n(61),l=n(90),d=n(6),c=Math.min,f=[].push,m="length",_=!d((function(){RegExp(4294967295,"y")}));n(62)("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?Y.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?Y.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()),O(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=H(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,O(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(44)(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?Y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(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(46)(D,"Promise"),n(41)("Promise"),o=n(21).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(60)((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(125),a=n(45);n(64)("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(65),i=n(95),o=n(4),s=n(38),u=n(9),l=n(7),d=n(5).ArrayBuffer,c=n(54),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(19),a=n(20),i=n(17),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(19),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(20),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(127)})},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(19),i=n(20),o=n(17),s=n(2),u=n(35),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(74);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(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(9),s=n(13),u=n(87);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(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(9),s=n(24),u=n(87);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(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!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(129),i=n(63),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(129),i=n(63),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(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(9),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(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(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);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(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!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(66),"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(66),"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(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"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(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"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(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("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(23);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(133),i=n(112);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(133)})},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(21),i=n(5),o=n(54),s=n(120);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(94),i=n(119);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(31),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(31),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(31),a=n(4),i=n(20),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(123),a=n(132),i=n(31),o=n(4),s=n(20),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(31),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(31),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(31),a=n(4),i=n(20),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(31),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(31),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(93)(),i=n(5).process,o="process"==n(23)(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(21),o=n(93)(),s=n(8)("observable"),u=n(13),l=n(4),d=n(42),c=n(44),f=n(14),m=n(43),_=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(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(5),s=n(14),u=n(49),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,w.prototype={constructor:w,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(Y),!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),Y(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;Y(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 w(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 Y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(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(;++n 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 > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\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-table tr, .file-table td {\n height: 40px;\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=Y.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:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&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 M=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 L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=M.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 b=[".DS_Store","Thumbs.db"];function k(e){return(null!==e.target&&e.target.files?T(e.target.files):[]).map((function(e){return L(e)}))}function Y(e,t){return y(this,void 0,void 0,(function(){var n;return v(this,(function(r){switch(r.label){case 0:return e.items?(n=T(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(D))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(T(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===b.indexOf(e.name)}))}function T(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,N(n)];if(e.sizen)return[!1,N(n)]}return[!0,null]}function U(e){return null!=e}function J(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=A(z(e,n),1)[0],i=A(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function B(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 G(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){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 oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),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),Y=Object(r.useReducer)(de,le),w=X(Y,2),T=w[0],D=w[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]),H=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",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[k,x,p]);var O=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||(q()?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",G,!1),document.addEventListener("drop",N,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",N))}}),[b,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),C.current=[].concat(Z(C.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return B(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(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:[]}),B(e)&&c&&c(e))}),[b,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),C.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(z(e,n),2),i=t[0],u=t[1],l=X(I(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:[R]})})),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]),ee=function(e){return a?null:e},te=function(e){return g?null:ee(e)},ne=function(e){return M?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=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=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,A)),onClick:ee(Q(s,F)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,b),a||g?{}:{tabIndex:0}),f)}}),[b,O,P,A,F,W,U,$,K,g,M,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=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=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,k);return re(re({},s),o)}}),[k,n,u,K,a]),me=E.length,_e=me>0&&J({files:E,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=me>0&&!_e;return re(re({},T),{},{isDragAccept:_e,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:b,inputRef:k,open:ee(j)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return v(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?Y(e.dataTransfer,e.type):k(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(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(_,{icon:o,className:"icon"})," ",n),r)}function fe(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);n0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg",style:{}},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=ve(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(_,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}function b(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]}for(var k=function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=Object.values(t),l=function(){var t=c[d],l=t.name,f=t.uid,m=t.isDirectory?"Directory":t.mimeType,_=t.isDirectory?"":b(t.size),h=t.isDirectory?"application/x-directory":t.mimeType,p=a&&a.valid?"&token="+a.value:"",y=[];if(n>0){for(var k=0;k0&&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&&e0?k: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===w,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()}))}))}}(Y)}},r.createElement(_,{icon:"download",className:"mr-1"}),"Download Selected Files (",w,")"),n.loggedIn?r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(e){return R("createDirectory")}},r.createElement(_,{icon:"plus",className:"mr-1"}),"Create Directory"):r.createElement(r.Fragment,null),D?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-primary",disabled:0===S.length,onClick:function(e){return n.loggedIn?R("upload"):V()}},r.createElement(_,{icon:"upload",className:"mr-1"}),"Upload"),r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===w,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?U():J(e)}))}}(Y)}},r.createElement(_,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",w,")")):r.createElement(r.Fragment,null)),T,r.createElement("div",null,x),r.createElement(fe,{title:"Create Directory",visible:l.visible,buttons:["Ok","Cancel"],onClose:z,onClick:function(e){if("Ok"===e){var t=0===l.directory?null:l.directory;"createDirectory"===l.type?n.createDirectory(l.directoryName,t).then((function(e){e.success?U():J(e,"Error creating directory")})):"upload"===l.type&&V()}z()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:l.directory,className:"form-control",onChange:function(e){return I(e,"directory")}},H)),"upload"!==l.type?r.createElement("div",{className:"form-group"},r.createElement("label",null,"Directory Name"),r.createElement("input",{type:"text",className:"form-control",value:l.directoryName,maxLength:32,placeholder:"Enter name…",onChange:function(e){return I(e,"directoryName")}})):r.createElement(r.Fragment,null)));function R(e){d(he(he({},l),{},{visible:!0,type:e}))}function z(){d(he(he({},l),{},{visible:!1}))}function I(e,t){d(he(he({},l),{},pe({},t,e.target.value)))}function U(){a.valid?n.validateToken(a.value).then((function(e){e?o(e.files):J(e)})):n.loggedIn&&n.listFiles().then((function(e){e?o(e.files):J(e)}))}function J(e,t){var n=f.slice();n.push({type:"danger",message:e.msg,title:t}),m(n)}function V(){var e=n.loggedIn?null:a.value,t=n.loggedIn&&0!==l.directory?l.directory:null;n.upload(p,e,t).then((function(e){e.success?(y([]),U()):J(e)}))}}var be=n(1),ke=n.n(be),Ye="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),we=new Uint8Array(16);function Te(){if(!Ye)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ye(we)}for(var De=[],Se=0;Se<256;++Se)De[Se]=(Se+256).toString(16).substr(1);var xe=function(e,t){var n=t||0,r=De;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 Ee=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||Te)();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||xe(a)};function je(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 w(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"],H=[],O=0;O<4;O++){var P=j[O];E(P)&&H.push(P)}var A,F=!1,C=a!==r;return E(a)&&C?(F=!0,A=a):H.length>0&&x(a)&&x(r)&&(F=!0,A=H[0]),F?{isNewState:!0,newState:{place:A}}:{isNewState:!1,position:{left:parseInt(w(r)-Y,10),top:parseInt(T(r)-k,10)}}}var Ke=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},qe=function(e,t,n){var r=t.getBoundingClientRect(),a=r.top,i=r.left,o=Ke(t),s=o.width,u=o.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+s/2,mouseY:a+u/2}},Qe=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}},Ze=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}},Xe=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 et(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 tt(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 nt(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var rt,at,it,ot={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 st(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 ot[e]?Fe({},ot[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 ut,lt=function(e){e.hide=function(e){ze(Re.HIDE,{target:e})},e.rebuild=function(){ze(Re.REBUILD)},e.show=function(e){ze(Re.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)}}}(rt=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(Re.HIDE,this.globalHide),window.addEventListener(Re.HIDE,this.globalHide,!1),window.removeEventListener(Re.REBUILD,this.globalRebuild),window.addEventListener(Re.REBUILD,this.globalRebuild,!1),window.removeEventListener(Re.SHOW,this.globalShow),window.addEventListener(Re.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(Re.HIDE,this.globalHide),window.removeEventListener(Re.REBUILD,this.globalRebuild),window.removeEventListener(Re.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(rt=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,Je.get(e,n));var r=Ie.bind(t,o);Je.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,Je.get(e,n)),i&&e.removeEventListener(i,this.hideTooltip)}}(rt=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(rt=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(rt=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=Ge(),u=Be(e,"data-event"),l=Be(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=Ve.bind(this,this.showTooltip,{}),d.mousemove=Ve.bind(this,this.updateTooltip,{respectEffect:!0}),d.mouseout=Ve.bind(this,this.hideTooltip,{})),u)d[c]=Ve.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||a;Ie.call(t,n,e)}),{customEvent:!0});for(var f in l)d[f]=Ve.bind(this,this.hideTooltip,{customEvent:!0});for(var m in d)s.addEventListener(m,d[m])},e.prototype.unbindBodyListener=function(e){e=e||Ge();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((it=at=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=We(this,Ce(t).call(this,e))).state={uuid:e.uuid||"t"+Ee(),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:tt(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&&Ne(e,t)}(t,e),He(t,null,[{key:"propTypes",get:function(){return{uuid:p.a.string,children:p.a.any,place:p.a.string,type:p.a.string,effect:p.a.string,offset:p.a.object,multiline:p.a.bool,border:p.a.bool,textColor:p.a.string,backgroundColor:p.a.string,borderColor:p.a.string,arrowColor:p.a.string,insecure:p.a.bool,class:p.a.string,className:p.a.string,id:p.a.string,html:p.a.bool,delayHide:p.a.number,delayUpdate:p.a.number,delayShow:p.a.number,event:p.a.string,eventOff:p.a.string,isCapture:p.a.bool,globalEventOff:p.a.string,getContent:p.a.any,afterShow:p.a.func,afterHide:p.a.func,overridePosition:p.a.func,disable:p.a.bool,scrollHide:p.a.bool,resizeHide:p.a.bool,wrapper:p.a.string,bodyMode:p.a.bool,possibleCustomEvents:p.a.string,possibleCustomEventsOff:p.a.string,clickable:p.a.bool}}}]),He(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 nt(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(nt(e.shadowRoot.querySelectorAll(t)))})),n.concat(nt(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)),et(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=$e(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=et(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=$e(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=st(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,Pe({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,Pe({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=tt(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?Fe({},t,{ariaProps:r}):null}}]),t}(a.a.Component),Oe(at,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),Oe(at,"supportedWrappers",["div","span"]),Oe(at,"displayName","ReactTooltip"),(ut=rt=it).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 ht(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)||pt(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 pt(e,t){if(e){if("string"==typeof e)return yt(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)?yt(e,t):void 0}}function yt(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(ct(ct({},p),{},{visible:!0}))}},r.createElement(_,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,b),r.createElement(fe,{title:"Create Token",visible:p.visible,buttons:["Ok","Cancel"],onClose:H,onClick:function(e){if("Ok"===e){var r=p.durability,a=0===r?null:ke()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");if("download"===p.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"===p.tokenType){var i=0===p.directory?null:p.directory;t.createUploadToken(r,i,p.maxFiles,p.maxSize,p.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")}))}}H()}},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:p.durability,onChange:function(e){return O(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:p.tokenType,className:"form-control",onChange:function(e){return O(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===p.tokenType?r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:p.directory,className:"form-control",onChange:function(e){return O(e,"directory")}},w)),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:p.maxFiles,onChange:function(e){return O(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:p.maxSize,onChange:function(e){return O(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:p.extensions,onChange:function(e){return O(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 H(){y(ct(ct({},p),{},{visible:!1}))}function O(e,t){y(ct(ct({},p),{},ft({},t,e.target.value)))}}function gt(e){return(gt="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 Mt(e){return function(e){if(Array.isArray(e))return Lt(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 Lt(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 Lt(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 Lt(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,kt({},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?kt({},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(kt(kt({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=kt(kt({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=kt(kt({},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.token.value=r.token.value?"":t,r.errorMessage=n.msg),e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(kt(kt({},this.state),{},{token:kt(kt({},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(vt,{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(Le,{files:this.state.files,token:this.state.token,api:this.api,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(_,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage),a.a.createElement("span",{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(kt(kt({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(kt(kt({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(_,{icon:"spinner"}))}}])&&wt(t.prototype,n),r&&wt(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Et,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,H=null,O=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,w(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=O;try{for(C(n),H=T(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===T(x)&&D(x),C(n)}else D(x);H=T(x)}if(null!==H)var l=!0;else{var d=T(E);null!==d&&a(N,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function R(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||P||(A=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return T(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(E,e),null===T(x)&&e===T(E)&&(F?i():F=!0,a(N,u-s))):(e.sortIndex=o,w(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!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(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=H(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=H(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((O=function(){if(this instanceof O)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),B(this,e,k(1,n))};return i&&V&&B(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),T.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,D.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),_.f=function(e){return G(m(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});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]=O(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(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?Y(e):q(Y(e),t)},defineProperty:K,defineProperties:q,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=O();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)}}),O.prototype[C]||n(14)(O.prototype,C,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);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(39)})},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(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(7);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(7);n(28)("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(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),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(105)})},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(20),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(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(5),a=n(17),i=n(23),o=n(76),s=n(26),u=n(6),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,m=r.Number,_=m,h=m.prototype,p="Number"==i(n(39)(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(24),i=n(109),o=n(77),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(109),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(110)})},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(110),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(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),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(78);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(79);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(112)})},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(111)})},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(78)})},function(e,t,n){var r=n(2),a=n(79),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(79),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(38),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(18),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(58)(!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(82),o="".endsWith;r(r.P+r.F*n(83)("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(82);r(r.P+r.F*n(83)("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(77)})},function(e,t,n){"use strict";var r=n(2),a=n(9),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("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(26);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(356);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(359))},function(e,t,n){"use strict";var r=n(4),a=n(26);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(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(9),l=n(85),d=n(86);a(a.S+a.F*!n(60)((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(85);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(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(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(73),i=n(23),o=n(38),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(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(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(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(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(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(5),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),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(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(4),a=n(53),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(91),o=n(61);n(62)("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(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g;n(62)("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,w)+E,b=w+Y.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(104),i=n(61);n(62)("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(59),a=n(4),i=n(54),o=n(91),s=n(9),u=n(61),l=n(90),d=n(6),c=Math.min,f=[].push,m="length",_=!d((function(){RegExp(4294967295,"y")}));n(62)("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?Y.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?Y.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()),O(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=H(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,O(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(44)(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?Y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(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(46)(D,"Promise"),n(41)("Promise"),o=n(21).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(60)((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(125),a=n(45);n(64)("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(65),i=n(95),o=n(4),s=n(38),u=n(9),l=n(7),d=n(5).ArrayBuffer,c=n(54),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(19),a=n(20),i=n(17),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(19),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(20),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(127)})},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(19),i=n(20),o=n(17),s=n(2),u=n(35),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(74);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(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(9),s=n(13),u=n(87);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(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(9),s=n(24),u=n(87);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(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!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(129),i=n(63),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(129),i=n(63),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(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(9),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(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(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);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(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!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(66),"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(66),"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(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"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(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"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(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("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(23);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(133),i=n(112);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(133)})},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(21),i=n(5),o=n(54),s=n(120);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(94),i=n(119);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(31),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(31),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(31),a=n(4),i=n(20),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(123),a=n(132),i=n(31),o=n(4),s=n(20),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(31),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(31),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(31),a=n(4),i=n(20),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(31),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(31),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(93)(),i=n(5).process,o="process"==n(23)(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(21),o=n(93)(),s=n(8)("observable"),u=n(13),l=n(4),d=n(42),c=n(44),f=n(14),m=n(43),_=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(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(5),s=n(14),u=n(49),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,w.prototype={constructor:w,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(Y),!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),Y(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;Y(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 w(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 Y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(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(;++n 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 > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\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-table tr, .file-table td {\n height: 40px;\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=Y.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:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&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 M=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 L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=M.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 b=[".DS_Store","Thumbs.db"];function k(e){return(null!==e.target&&e.target.files?T(e.target.files):[]).map((function(e){return L(e)}))}function Y(e,t){return y(this,void 0,void 0,(function(){var n;return v(this,(function(r){switch(r.label){case 0:return e.items?(n=T(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(D))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(T(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===b.indexOf(e.name)}))}function T(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,N(n)];if(e.sizen)return[!1,N(n)]}return[!0,null]}function U(e){return null!=e}function J(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=A(z(e,n),1)[0],i=A(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function B(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 G(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){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 oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),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),Y=Object(r.useReducer)(de,le),w=X(Y,2),T=w[0],D=w[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]),H=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",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[k,x,p]);var O=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||(q()?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",G,!1),document.addEventListener("drop",N,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",N))}}),[b,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),C.current=[].concat(Z(C.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(D({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return B(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(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:[]}),B(e)&&c&&c(e))}),[b,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),C.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(z(e,n),2),i=t[0],u=t[1],l=X(I(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:[R]})})),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]),ee=function(e){return a?null:e},te=function(e){return g?null:ee(e)},ne=function(e){return M?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=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=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,A)),onClick:ee(Q(s,F)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,b),a||g?{}:{tabIndex:0}),f)}}),[b,O,P,A,F,W,U,$,K,g,M,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=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=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,k);return re(re({},s),o)}}),[k,n,u,K,a]),me=E.length,_e=me>0&&J({files:E,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=me>0&&!_e;return re(re({},T),{},{isDragAccept:_e,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:b,inputRef:k,open:ee(j)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return v(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?Y(e.dataTransfer,e.type):k(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(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(_,{icon:o,className:"icon"})," ",n),r)}function fe(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);n0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg",style:{}},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=ve(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(_,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}function b(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]}for(var k=function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=Object.values(t),l=function(){var t=c[d],l=t.name,f=t.uid,m=t.isDirectory?"Directory":t.mimeType,_=t.isDirectory?"":b(t.size),h=t.isDirectory?"application/x-directory":t.mimeType,p=a&&a.valid?"&token="+a.value:"",y=[];if(n>0){for(var k=0;k0&&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&&e0?k: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===w,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()}))}))}}(Y)}},r.createElement(_,{icon:"download",className:"mr-1"}),"Download Selected Files (",w,")"),n.loggedIn?r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(e){return R("createDirectory")}},r.createElement(_,{icon:"plus",className:"mr-1"}),"Create Directory"):r.createElement(r.Fragment,null),D?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-primary",disabled:0===S.length,onClick:function(e){return n.loggedIn?R("upload"):V()}},r.createElement(_,{icon:"upload",className:"mr-1"}),"Upload"),r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===w,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?U():J(e)}))}}(Y)}},r.createElement(_,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",w,")")):r.createElement(r.Fragment,null)),T,r.createElement("div",null,x),r.createElement(fe,{title:"Create Directory",visible:l.visible,buttons:["Ok","Cancel"],onClose:z,onClick:function(e){if("Ok"===e){var t=0===l.directory?null:l.directory;"createDirectory"===l.type?n.createDirectory(l.directoryName,t).then((function(e){e.success?U():J(e,"Error creating directory")})):"upload"===l.type&&V()}z()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:l.directory,className:"form-control",onChange:function(e){return I(e,"directory")}},H)),"upload"!==l.type?r.createElement("div",{className:"form-group"},r.createElement("label",null,"Directory Name"),r.createElement("input",{type:"text",className:"form-control",value:l.directoryName,maxLength:32,placeholder:"Enter name…",onChange:function(e){return I(e,"directoryName")}})):r.createElement(r.Fragment,null)));function R(e){d(he(he({},l),{},{visible:!0,type:e}))}function z(){d(he(he({},l),{},{visible:!1}))}function I(e,t){d(he(he({},l),{},pe({},t,e.target.value)))}function U(){a.valid?n.validateToken(a.value).then((function(e){e?o(e.files):J(e)})):n.loggedIn&&n.listFiles().then((function(e){e?o(e.files):J(e)}))}function J(e,t){var n=f.slice();n.push({type:"danger",message:e.msg,title:t}),m(n)}function V(){var e=n.loggedIn?null:a.value,t=n.loggedIn&&0!==l.directory?l.directory:null;n.upload(p,e,t).then((function(e){e.success?(y([]),U()):J(e)}))}}var be=n(1),ke=n.n(be),Ye="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),we=new Uint8Array(16);function Te(){if(!Ye)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ye(we)}for(var De=[],Se=0;Se<256;++Se)De[Se]=(Se+256).toString(16).substr(1);var xe=function(e,t){var n=t||0,r=De;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 Ee=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||Te)();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||xe(a)};function je(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 w(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"],H=[],O=0;O<4;O++){var P=j[O];E(P)&&H.push(P)}var A,F=!1,C=a!==r;return E(a)&&C?(F=!0,A=a):H.length>0&&x(a)&&x(r)&&(F=!0,A=H[0]),F?{isNewState:!0,newState:{place:A}}:{isNewState:!1,position:{left:parseInt(w(r)-Y,10),top:parseInt(T(r)-k,10)}}}var Ke=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},qe=function(e,t,n){var r=t.getBoundingClientRect(),a=r.top,i=r.left,o=Ke(t),s=o.width,u=o.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+s/2,mouseY:a+u/2}},Qe=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}},Ze=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}},Xe=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 et(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 tt(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 nt(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var rt,at,it,ot={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 st(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 ot[e]?Fe({},ot[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 ut,lt=function(e){e.hide=function(e){ze(Re.HIDE,{target:e})},e.rebuild=function(){ze(Re.REBUILD)},e.show=function(e){ze(Re.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)}}}(rt=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(Re.HIDE,this.globalHide),window.addEventListener(Re.HIDE,this.globalHide,!1),window.removeEventListener(Re.REBUILD,this.globalRebuild),window.addEventListener(Re.REBUILD,this.globalRebuild,!1),window.removeEventListener(Re.SHOW,this.globalShow),window.addEventListener(Re.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(Re.HIDE,this.globalHide),window.removeEventListener(Re.REBUILD,this.globalRebuild),window.removeEventListener(Re.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(rt=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,Je.get(e,n));var r=Ie.bind(t,o);Je.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,Je.get(e,n)),i&&e.removeEventListener(i,this.hideTooltip)}}(rt=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(rt=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(rt=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=Ge(),u=Be(e,"data-event"),l=Be(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=Ve.bind(this,this.showTooltip,{}),d.mousemove=Ve.bind(this,this.updateTooltip,{respectEffect:!0}),d.mouseout=Ve.bind(this,this.hideTooltip,{})),u)d[c]=Ve.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||a;Ie.call(t,n,e)}),{customEvent:!0});for(var f in l)d[f]=Ve.bind(this,this.hideTooltip,{customEvent:!0});for(var m in d)s.addEventListener(m,d[m])},e.prototype.unbindBodyListener=function(e){e=e||Ge();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((it=at=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=We(this,Ce(t).call(this,e))).state={uuid:e.uuid||"t"+Ee(),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:tt(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&&Ne(e,t)}(t,e),He(t,null,[{key:"propTypes",get:function(){return{uuid:p.a.string,children:p.a.any,place:p.a.string,type:p.a.string,effect:p.a.string,offset:p.a.object,multiline:p.a.bool,border:p.a.bool,textColor:p.a.string,backgroundColor:p.a.string,borderColor:p.a.string,arrowColor:p.a.string,insecure:p.a.bool,class:p.a.string,className:p.a.string,id:p.a.string,html:p.a.bool,delayHide:p.a.number,delayUpdate:p.a.number,delayShow:p.a.number,event:p.a.string,eventOff:p.a.string,isCapture:p.a.bool,globalEventOff:p.a.string,getContent:p.a.any,afterShow:p.a.func,afterHide:p.a.func,overridePosition:p.a.func,disable:p.a.bool,scrollHide:p.a.bool,resizeHide:p.a.bool,wrapper:p.a.string,bodyMode:p.a.bool,possibleCustomEvents:p.a.string,possibleCustomEventsOff:p.a.string,clickable:p.a.bool}}}]),He(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 nt(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){n=n.concat(nt(e.shadowRoot.querySelectorAll(t)))})),n.concat(nt(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)),et(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=$e(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=et(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=$e(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=st(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,Pe({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,Pe({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=tt(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?Fe({},t,{ariaProps:r}):null}}]),t}(a.a.Component),Oe(at,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),Oe(at,"supportedWrappers",["div","span"]),Oe(at,"displayName","ReactTooltip"),(ut=rt=it).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 ht(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)||pt(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 pt(e,t){if(e){if("string"==typeof e)return yt(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)?yt(e,t):void 0}}function yt(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(ct(ct({},p),{},{visible:!0}))}},r.createElement(_,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,b),r.createElement(fe,{title:"Create Token",visible:p.visible,buttons:["Ok","Cancel"],onClose:H,onClick:function(e){if("Ok"===e){var r=p.durability,a=0===r?null:ke()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");if("download"===p.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"===p.tokenType){var i=0===p.directory?null:p.directory;t.createUploadToken(r,i,p.maxFiles,p.maxSize,p.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")}))}}H()}},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:p.durability,onChange:function(e){return O(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:p.tokenType,className:"form-control",onChange:function(e){return O(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===p.tokenType?r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:p.directory,className:"form-control",onChange:function(e){return O(e,"directory")}},w)),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:p.maxFiles,onChange:function(e){return O(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:p.maxSize,onChange:function(e){return O(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:p.extensions,onChange:function(e){return O(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 H(){y(ct(ct({},p),{},{visible:!1}))}function O(e,t){y(ct(ct({},p),{},ft({},t,e.target.value)))}}function gt(e){return(gt="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 Mt(e){return function(e){if(Array.isArray(e))return Lt(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 Lt(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 Lt(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 Lt(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,kt({},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?kt({},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(kt(kt({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=kt(kt({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=kt(kt({},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.token.value=r.token.value?"":t,r.errorMessage=n.msg),e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(kt(kt({},this.state),{},{token:kt(kt({},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(vt,{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(Le,{files:this.state.files,token:this.state.token,api:this.api,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(_,{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(kt(kt({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(kt(kt({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(_,{icon:"spinner"}))}}])&&wt(t.prototype,n),r&&wt(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Et,null),document.getElementById("root"))}]); \ No newline at end of file