-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-collaboration-upload-js-35327f2495107704fd7b.js
2 lines (2 loc) · 31.4 KB
/
component---src-pages-collaboration-upload-js-35327f2495107704fd7b.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"4w6A":function(t,e,n){var r,o;n("HXzo"),n("HQhv"),n("sc67"),n("sC2a"),n("n7j8"),r=this,o=function(t){var e=function t(e){return new t.lib.init(e)};function n(t,e){return!(!t||"string"!=typeof e||!(t.className&&t.className.trim().split(/\s+/gi).indexOf(e)>-1))}return e.lib=e.prototype={toastify:"1.6.1",constructor:e,init:function(t){return t||(t={}),this.options={},this.toastElement=null,this.options.text=t.text||"Hi there!",this.options.duration=t.duration||3e3,this.options.selector=t.selector,this.options.callback=t.callback||function(){},this.options.destination=t.destination,this.options.newWindow=t.newWindow||!1,this.options.close=t.close||!1,this.options.gravity="bottom"==t.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=t.positionLeft||!1,this.options.position=t.position||"",this.options.backgroundColor=t.backgroundColor,this.options.avatar=t.avatar||"",this.options.className=t.className||"",this.options.stopOnFocus=void 0===t.stopOnFocus||t.stopOnFocus,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var t=document.createElement("div");if(t.className="toastify on "+this.options.className,this.options.position?t.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(t.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):t.className+=" toastify-right",t.className+=" "+this.options.gravity,this.options.backgroundColor&&(t.style.background=this.options.backgroundColor),t.innerHTML=this.options.text,""!==this.options.avatar){var e=document.createElement("img");e.src=this.options.avatar,e.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?t.appendChild(e):t.insertAdjacentElement("beforeend",e)}if(!0===this.options.close){var n=document.createElement("span");if(n.innerHTML="✖",n.className="toast-close",n.addEventListener("click",function(t){t.stopPropagation(),this.removeElement(t.target.parentElement),window.clearTimeout(t.target.parentElement.timeOutValue)}.bind(this)),this.options.stopOnFocus&&this.options.duration>0){var r=this;t.addEventListener("mouseover",(function(e){window.clearTimeout(t.timeOutValue)})),t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){r.removeElement(t)}),r.options.duration)}))}var o=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&o>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}return void 0!==this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),t},showToast:function(){var t;if(this.toastElement=this.buildToast(),!(t=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return t.insertBefore(this.toastElement,t.firstChild),e.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on",""),window.setTimeout(function(){t.parentNode.removeChild(t),this.options.callback.call(t),e.reposition()}.bind(this),400)}},e.reposition=function(){for(var t,e={top:15,bottom:15},r={top:15,bottom:15},o={top:15,bottom:15},i=document.getElementsByClassName("toastify"),a=0;a<i.length;a++){t=!0===n(i[a],"toastify-top")?"toastify-top":"toastify-bottom";var u=i[a].offsetHeight;t=t.substr(9,t.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(i[a].style[t]=o[t]+"px",o[t]+=u+15):!0===n(i[a],"toastify-left")?(i[a].style[t]=e[t]+"px",e[t]+=u+15):(i[a].style[t]=r[t]+"px",r[t]+=u+15)}return this},e.lib.init.prototype=e.lib,e},t.exports?t.exports=o():r.Toastify=o()},GSnI:function(t,e,n){"use strict";var r=n("q1tI"),o=n.n(r);n("lV/j");e.a=function(t){t.children,t.id;var e=t.title,n=t.subtitle,r=t.style;return o.a.createElement("div",{style:r,className:"vid_c_header"},o.a.createElement("h2",null,e),o.a.createElement("p",null,n))}},eMbh:function(t,e,n){n("WevN"),n("HXzo"),n("wZFJ"),n("sC2a"),n("pJf4"),n("HQhv"),n("MIFh"),n("q8oJ"),n("C9fy"),n("8npG"),n("R48M"),t.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=13)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(32)("wks"),o=n(9),i=n(0).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(0),o=n(2),i=n(8),a=n(22),u=n(10),c=function t(e,n,c){var s,l,f,p,d=e&t.F,v=e&t.G,y=e&t.P,h=e&t.B,m=v?r:e&t.S?r[n]||(r[n]={}):(r[n]||{}).prototype,g=v?o:o[n]||(o[n]={}),b=g.prototype||(g.prototype={});for(s in v&&(c=n),c)f=((l=!d&&m&&void 0!==m[s])?m:c)[s],p=h&&l?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,m&&a(m,s,f,e&t.U),g[s]!=f&&i(g,s,p),y&&b[s]!=f&&(b[s]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(16),o=n(21);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(28),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return n.some((function(t){var e=t.trim();return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):e.endsWith("/*")?i===e.replace(/\/.*$/,""):o===e}))}return!0},n(14),n(34)},function(t,e,n){n(15),t.exports=n(2).Array.some},function(t,e,n){"use strict";var r=n(7),o=n(25)(3);r(r.P+r.F*!n(33)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(17),o=n(18),i=n(20),a=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(1);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(3)&&!n(4)((function(){return 7!=Object.defineProperty(n(19)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(1),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(1);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(0),o=n(8),i=n(23),a=n(9)("src"),u=Function.toString,c=(""+u).split("toString");n(2).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||u.call(this)}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(10),o=n(26),i=n(27),a=n(12),u=n(29);t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,l=4==t,f=6==t,p=5==t||f,d=e||u;return function(e,u,v){for(var y,h,m=i(e),g=o(m),b=r(u,v,3),w=a(g.length),O=0,_=n?d(e,w):c?d(e,0):void 0;w>O;O++)if((p||O in g)&&(h=b(y=g[O],O,m),t))if(n)_[O]=h;else if(h)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:_.push(y)}else if(l)return!1;return f?-1:s||l?l:_}}},function(t,e,n){var r=n(5);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(11);t.exports=function(t){return Object(r(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(30);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(1),o=n(31),i=n(6)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var r=n(5);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){n(35),t.exports=n(2).String.endsWith},function(t,e,n){"use strict";var r=n(7),o=n(12),i=n(36),a="".endsWith;r(r.P+r.F*n(38)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){var r=n(37),o=n(11);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(1),o=n(5),i=n(6)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}}])},mrSG:function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return o})),n.d(e,"__assign",(function(){return i})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return u})),n.d(e,"__param",(function(){return c})),n.d(e,"__metadata",(function(){return s})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return f})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return d})),n.d(e,"__read",(function(){return v})),n.d(e,"__spread",(function(){return y})),n.d(e,"__spreadArrays",(function(){return h})),n.d(e,"__await",(function(){return m})),n.d(e,"__asyncGenerator",(function(){return g})),n.d(e,"__asyncDelegator",(function(){return b})),n.d(e,"__asyncValues",(function(){return w})),n.d(e,"__makeTemplateObject",(function(){return O})),n.d(e,"__importStar",(function(){return _})),n.d(e,"__importDefault",(function(){return E}));n("rzGZ"),n("m210"),n("6kNP"),n("8npG"),n("R48M"),n("4DPX"),n("sc67"),n("E5k/"),n("pS08"),n("LagC");var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function u(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function c(t,e){return function(n,r){e(n,r,t)}}function s(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(e){i(e)}}function u(t){try{c(r.throw(t))}catch(e){i(e)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,u)}c((r=r.apply(t,e||[])).next())}))}function f(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function p(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}function h(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function g(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){i.push([t,e,n,r])>1||u(t,e)}))})}function u(t,e){try{(n=o[t](e)).value instanceof m?Promise.resolve(n.value.v).then(c,s):l(i[0][2],n)}catch(r){l(i[0][3],r)}var n}function c(t){u("next",t)}function s(t){u("throw",t)}function l(t,e){t(e),i.shift(),i.length&&u(i[0][0],i[0][1])}}function b(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}function O(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function E(t){return t&&t.__esModule?t:{default:t}}},xiou:function(t,e,n){"use strict";n.r(e);n("sPse"),n("q8oJ"),n("8npG");var r=n("q1tI"),o=n.n(r),i=n("VmWr"),a=n("0osF"),u=(n("y7hu"),n("zVqF"),n("h3sT")),c=n("4w6A"),s=n.n(c),l=(n("CARs"),n("if7W")),f=function(t){var e=t.link;return o.a.createElement("div",{className:"linkk"},o.a.createElement("input",{readOnly:!0,value:e,type:"text",id:"myInput"}),o.a.createElement(u.a,{onClick:function(){var t=document.getElementById("myInput");t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),s()({text:"Link wurde kopiert"}).showToast()}},"Copy"))},p=(n("E5k/"),n("6kNP"),n("sc67"),n("R48M"),n("JHok"),n("OeI1"),n("Dq+y"),n("Ggvi"),n("MIFh"),n("YbXK"),n("cFtU"),n("C9fy"),n("m210"),n("4DPX"),n("rzGZ"),n("17x9")),d=n.n(p),v=(n("U6Bt"),n("pJf4"),n("AqHK"),n("mrSG")),y=(n("HQhv"),n("lFjb"),n("xJgp"),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 h(t,e){var n=function(t){var e=t.name;if(e&&-1!==e.lastIndexOf(".")&&!t.type){var n=e.split(".").pop().toLowerCase(),r=y.get(n);r&&Object.defineProperty(t,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return t}(t);if("string"!=typeof n.path){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof e?e:"string"==typeof r&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}var m=[".DS_Store","Thumbs.db"];function g(t){return v.__awaiter(this,void 0,void 0,(function(){return v.__generator(this,(function(e){return[2,(n=t,n.dataTransfer&&t.dataTransfer?w(t.dataTransfer,t.type):b(t))];var n}))}))}function b(t){return(null!==t.target&&t.target.files?_(t.target.files):[]).map((function(t){return h(t)}))}function w(t,e){return v.__awaiter(this,void 0,void 0,(function(){var n;return v.__generator(this,(function(r){switch(r.label){case 0:return t.items?(n=_(t.items).filter((function(t){return"file"===t.kind})),"drop"!==e?[2,n]:[4,Promise.all(n.map(E))]):[3,2];case 1:return[2,O(x(r.sent()))];case 2:return[2,O(_(t.files).map((function(t){return h(t)})))]}}))}))}function O(t){return t.filter((function(t){return-1===m.indexOf(t.name)}))}function _(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function E(t){if("function"!=typeof t.webkitGetAsEntry)return j(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?S(e):j(t)}function x(t){return t.reduce((function(t,e){return v.__spread(t,Array.isArray(e)?x(e):[e])}),[])}function j(t){var e=t.getAsFile();if(!e)return Promise.reject(t+" is not a File");var n=h(e);return Promise.resolve(n)}function D(t){return v.__awaiter(this,void 0,void 0,(function(){return v.__generator(this,(function(e){return[2,t.isDirectory?S(t):P(t)]}))}))}function S(t){var e=t.createReader();return new Promise((function(t,n){var r=[];!function o(){var i=this;e.readEntries((function(e){return v.__awaiter(i,void 0,void 0,(function(){var i,a,u;return v.__generator(this,(function(c){switch(c.label){case 0:if(e.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return i=c.sent(),t(i),[3,4];case 3:return a=c.sent(),n(a),[3,4];case 4:return[3,6];case 5:u=Promise.all(e.map(D)),r.push(u),o(),c.label=6;case 6:return[2]}}))}))}),(function(t){n(t)}))}()}))}function P(t){return v.__awaiter(this,void 0,void 0,(function(){return v.__generator(this,(function(e){return[2,new Promise((function(e,n){t.file((function(n){var r=h(n,t.fullPath);e(r)}),(function(t){n(t)}))}))]}))}))}n("wZFJ");var k=n("eMbh"),F=n.n(k);function A(t,e){return"application/x-moz-file"===t.type||F()(t,e)}function C(t){return"function"==typeof t.isPropagationStopped?t.isPropagationStopped():void 0!==t.cancelBubble&&t.cancelBubble}function T(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,(function(t){return"Files"===t||"application/x-moz-file"===t})):!!t.target&&!!t.target.files}function R(t){t.preventDefault()}function L(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.some((function(e){return!C(t)&&e&&e.apply(void 0,[t].concat(r)),C(t)}))}}function I(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function M(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){z(t,e,n[e])}))}return t}function z(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W(t){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function G(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var B=Object(r.forwardRef)((function(t,e){var n=t.children,i=q(G(t,["children"])),a=i.open,u=G(i,["open"]);return Object(r.useEffect)((function(){return"function"==typeof e?e({open:a}):"object"===W(e)&&null!==e&&(e.current={open:a}),function(){"function"==typeof e?e(null):"object"===W(e)&&null!==e&&(e.current=null)}}),[e]),o.a.createElement(r.Fragment,null,n(N({},u,{open:a})))}));B.displayName="Dropzone",B.propTypes={children:d.a.func,accept:d.a.oneOfType([d.a.string,d.a.arrayOf(d.a.string)]),multiple:d.a.bool,preventDropOnDocument:d.a.bool,noClick:d.a.bool,noKeyboard:d.a.bool,noDrag:d.a.bool,noDragEventsBubbling:d.a.bool,minSize:d.a.number,maxSize:d.a.number,disabled:d.a.bool,getFilesFromEvent:d.a.func,onFileDialogCancel:d.a.func,onDragEnter:d.a.func,onDragLeave:d.a.func,onDragOver:d.a.func,onDrop:d.a.func,onDropAccepted:d.a.func,onDropRejected:d.a.func};var H={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],rejectedFiles:[]};function q(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.accept,n=t.disabled,o=void 0!==n&&n,i=t.getFilesFromEvent,a=void 0===i?g:i,u=t.maxSize,c=void 0===u?1/0:u,s=t.minSize,l=void 0===s?0:s,f=t.multiple,p=void 0===f||f,d=t.onDragEnter,v=t.onDragLeave,y=t.onDragOver,h=t.onDrop,m=t.onDropAccepted,b=t.onDropRejected,w=t.onFileDialogCancel,O=t.preventDropOnDocument,_=void 0===O||O,E=t.noClick,x=void 0!==E&&E,j=t.noKeyboard,D=void 0!==j&&j,S=t.noDrag,P=void 0!==S&&S,k=t.noDragEventsBubbling,F=void 0!==k&&k,W=Object(r.useRef)(null),B=Object(r.useRef)(null),q=M(Object(r.useReducer)(K,H),2),J=q[0],V=q[1],X=J.isFocused,U=J.isFileDialogActive,Z=J.draggedFiles,Q=function(){B.current&&(V({type:"openDialog"}),B.current.value=null,B.current.click())},$=function(){U&&setTimeout((function(){B.current&&(B.current.files.length||(V({type:"closeDialog"}),"function"==typeof w&&w()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",$,!1),function(){window.removeEventListener("focus",$,!1)}}),[B,U,w]);var Y=Object(r.useCallback)((function(t){W.current&&W.current.isEqualNode(t.target)&&(32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),Q()))}),[W,B]),tt=Object(r.useCallback)((function(){V({type:"focus"})}),[]),et=Object(r.useCallback)((function(){V({type:"blur"})}),[]),nt=Object(r.useCallback)((function(){x||(!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?Q():setTimeout(Q,0))}),[B,x]),rt=Object(r.useRef)([]),ot=function(t){W.current&&W.current.contains(t.target)||(t.preventDefault(),rt.current=[])};Object(r.useEffect)((function(){return _&&(document.addEventListener("dragover",R,!1),document.addEventListener("drop",ot,!1)),function(){_&&(document.removeEventListener("dragover",R),document.removeEventListener("drop",ot))}}),[W,_]);var it=Object(r.useCallback)((function(t){t.preventDefault(),t.persist(),pt(t),-1===rt.current.indexOf(t.target)&&(rt.current=[].concat(I(rt.current),[t.target])),T(t)&&Promise.resolve(a(t)).then((function(e){C(t)&&!F||(V({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),d&&d(t))}))}),[a,d,F]),at=Object(r.useCallback)((function(t){if(t.preventDefault(),t.persist(),pt(t),t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch(e){}return T(t)&&y&&y(t),!1}),[y,F]),ut=Object(r.useCallback)((function(t){t.preventDefault(),t.persist(),pt(t);var e=rt.current.filter((function(e){return e!==t.target&&W.current&&W.current.contains(e)}));rt.current=e,e.length>0||(V({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),T(t)&&v&&v(t))}),[W,v,F]),ct=Object(r.useCallback)((function(t){t.preventDefault(),t.persist(),pt(t),rt.current=[],V({type:"reset"}),T(t)&&Promise.resolve(a(t)).then((function(n){if(!C(t)||F){var r=[],o=[];n.forEach((function(t){A(t,e)&&function(t,e,n){return t.size<=e&&t.size>=n}(t,c,l)?r.push(t):o.push(t)})),!p&&r.length>1&&o.push.apply(o,I(r.splice(0))),V({acceptedFiles:r,rejectedFiles:o,type:"setFiles"}),h&&h(r,o,t),o.length>0&&b&&b(o,t),r.length>0&&m&&m(r,t)}}))}),[p,e,l,c,a,h,m,b,F]),st=function(t){return o?null:t},lt=function(t){return D?null:st(t)},ft=function(t){return P?null:st(t)},pt=function(t){F&&t.stopPropagation()},dt=Object(r.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,r=t.onKeyDown,i=t.onFocus,a=t.onBlur,u=t.onClick,c=t.onDragEnter,s=t.onDragOver,l=t.onDragLeave,f=t.onDrop,p=G(t,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return N(z({onKeyDown:lt(L(r,Y)),onFocus:lt(L(i,tt)),onBlur:lt(L(a,et)),onClick:st(L(u,nt)),onDragEnter:ft(L(c,it)),onDragOver:ft(L(s,at)),onDragLeave:ft(L(l,ut)),onDrop:ft(L(f,ct))},n,W),o||D?{}:{tabIndex:0},p)}}),[W,Y,tt,et,nt,it,at,ut,ct,D,P,o]),vt=Object(r.useCallback)((function(t){t.stopPropagation()}),[]),yt=Object(r.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.refKey,r=void 0===n?"ref":n,o=t.onChange,i=t.onClick,a=G(t,["refKey","onChange","onClick"]),u=z({accept:e,multiple:p,type:"file",style:{display:"none"},onChange:st(L(o,ct)),onClick:st(L(i,vt)),autoComplete:"off",tabIndex:-1},r,B);return N({},u,a)}}),[B,e,p,ct,o]),ht=Z.length,mt=p||ht<=1,gt=ht>0&&function(t,e){return t.every((function(t){return A(t,e)}))}(Z,e);return N({},J,{isDragAccept:gt,isDragReject:ht>0&&(!gt||!mt),isFocused:X&&!o,getRootProps:dt,getInputProps:yt,rootRef:W,inputRef:B,open:st(Q)})}function K(t,e){switch(e.type){case"focus":return N({},t,{isFocused:!0});case"blur":return N({},t,{isFocused:!1});case"openDialog":return N({},t,{isFileDialogActive:!0});case"closeDialog":return N({},t,{isFileDialogActive:!1});case"setDraggedFiles":var n=e.isDragActive;return N({},t,{draggedFiles:e.draggedFiles,isDragActive:n});case"setFiles":return N({},t,{acceptedFiles:e.acceptedFiles,rejectedFiles:e.rejectedFiles});case"reset":return N({},t,{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[]});default:return t}}n("7aiN");var J=function(t){var e=q({onDrop:t.onDrop,multiple:!1,accept:".mp4,image/*,application/pdf"}),n=e.getRootProps,r=e.getInputProps,i=e.isDragActive;return o.a.createElement("div",Object.assign({className:"dropzone"},n()),o.a.createElement("input",r()),i?o.a.createElement("p",null,"Drop the files here ..."):o.a.createElement("p",null,"Drag 'n' drop some files here, or click to select files"))},V=n("I3Kv"),X=n("GSnI"),U=n("zEh/");e.default=function(){var t=Object(r.useState)(null),e=t[0],n=t[1],u=Object(r.useState)(null),c=u[0],s=u[1],p=Object(r.useCallback)((function(t){var e=Math.random().toString(36).substring(7),r=new URLSearchParams(window.location.search).get("folder");Object(U.a)({files:[t[0]]},(function(t){return n(window.location.origin+"/collaboration/file/?workspace="+t.public_id)}),r,e,(function(t){return s(t)}))}));return o.a.createElement("div",null,o.a.createElement("div",{className:"dropzone-wrapper"},o.a.createElement(a.a,null,o.a.createElement(i.a,null,o.a.createElement(V.a,null),o.a.createElement(X.a,{title:l.a.collaboration.upload.title+" "+(c?c+"/100%":""),subtitle:"Please upload PDF here"}),o.a.createElement(J,{onDrop:p}),e&&o.a.createElement(f,{link:e})),o.a.createElement(V.a,null))))}},y7hu:function(t,e,n){"use strict";n("t+fG")("link",(function(t){return function(e){return t(this,"a","href",e)}}))},"zEh/":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("6kNP"),n("8npG");function r(t,e,n,r,o){return new Promise((function(i,a){console.log(r);var u=new XMLHttpRequest,c=new FormData;c.append("file",t.files[0]),u.open("POST","https://api.cloudinary.com/v1_1/hvioxpubt/upload?upload_preset=ml_default",!0),u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.upload.onprogress=function(t){var e=Math.ceil(t.loaded/t.total*100);o&&o(e)},u.onreadystatechange=function(t){if(4===u.readyState&&200===u.status){var n=JSON.parse(u.responseText);e(n),i()}},c.append("tags","browser_upload"),n&&c.append("folder",n),r&&c.append("public_id",r),u.send(c),u.onerror=a}))}}}]);
//# sourceMappingURL=component---src-pages-collaboration-upload-js-35327f2495107704fd7b.js.map