/*! * FilePond 4.4.10 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. */ /* eslint-disable */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).FilePond={})}(this,function(e){"use strict";var t,n,r=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])},o=function(e){var t={};return r(e,function(n){!function(e,t,n){"function"!=typeof n?Object.defineProperty(e,t,Object.assign({},n)):e[t]=n}(t,n,e[n])}),t},i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},a=["svg","path"],u=function(e){return a.includes(e)},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof t&&(n=t,t=null);var o=u(e)?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return t&&(u(e)?i(o,"class",t):o.className=t),r(n,function(e,t){i(o,e,t)}),o},l=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},c=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},f=function(e,t,n,r){var o=n[0]||e.left,i=n[1]||e.top,a=o+e.width,u=i+e.height*(r[1]||1),s={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:o,top:i,right:a,bottom:u}};return t.filter(function(e){return!e.isRectIgnored()}).map(function(e){return e.rect}).forEach(function(e){p(s.inner,Object.assign({},e.inner)),p(s.outer,Object.assign({},e.outer))}),d(s.inner),s.outer.bottom+=s.element.marginBottom,s.outer.right+=s.element.marginRight,d(s.outer),s},p=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},d=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},E=function(e){return"number"==typeof e},_=function(e){return e<.5?2*e*e:(4-2*e)*e-1},T={spring:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,i=void 0===r?.75:r,a=e.mass,u=void 0===a?10:a,s=null,l=null,c=0,f=!1,p=o({interpolate:function(){if(!f){if(!E(s)||!E(l))return f=!0,void(c=0);!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,a=n.easing,u=void 0===a?_:a,s=n.delay,l=void 0===s?0:s,c=null,f=!0,p=!1,d=null,E=o({interpolate:function(n){f||null===d||(null===c&&(c=n),n-c=0?u(p?1-t:t):0)*d)):(e=1,t=p?0:1,E.onupdate(t*d),E.oncomplete(t*d),f=!0)))},target:{get:function(){return p?0:d},set:function(e){if(null===d)return d=e,E.onupdate(e),void E.oncomplete(e);e3&&void 0!==arguments[3]&&arguments[3];(t=Array.isArray(t)?t:[t]).forEach(function(t){e.forEach(function(e){var o=e,i=function(){return n[e]},a=function(t){return n[e]=t};"object"==typeof e&&(o=e.key,i=e.getter||i,a=e.setter||a),t[o]&&!r||(t[o]={get:i,set:a})})})},v=function(e){return null!=e},g={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},R=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},h=function(e,t){var n=t.opacity,r=t.perspective,o=t.translateX,i=t.translateY,a=t.scaleX,u=t.scaleY,s=t.rotateX,l=t.rotateY,c=t.rotateZ,f=t.originX,p=t.originY,d=t.width,E=t.height,_="",T="";(v(f)||v(p))&&(T+="transform-origin: "+(f||0)+"px "+(p||0)+"px;"),v(r)&&(_+="perspective("+r+"px) "),(v(o)||v(i))&&(_+="translate3d("+(o||0)+"px, "+(i||0)+"px, 0) "),(v(a)||v(u))&&(_+="scale3d("+(v(a)?a:1)+", "+(v(u)?u:1)+", 1) "),v(c)&&(_+="rotateZ("+c+"rad) "),v(s)&&(_+="rotateX("+s+"rad) "),v(l)&&(_+="rotateY("+l+"rad) "),_.length&&(T+="transform:"+_+";"),v(n)&&(T+="opacity:"+n+";",0===n&&(T+="visibility:hidden;"),n<1&&(T+="pointer-events:none;")),v(E)&&(T+="height:"+E+"px;"),v(d)&&(T+="width:"+d+"px;");var I=e.elementCurrentStyle||"";T.length===I.length&&T===I||(e.setAttribute("style",T),e.elementCurrentStyle=T)},O={styles:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,i=e.view,a=Object.assign({},n),u={};m(t,[r,o],n);var s=function(){return i.rect?f(i.rect,i.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return r.rect={get:s},o.rect={get:s},t.forEach(function(e){n[e]=void 0===a[e]?g[e]:a[e]}),{write:function(){if(R(u,n))return h(i.element,n),Object.assign(u,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t,n=e.viewExternalAPI,r=(e.viewState,e.view),o=[],i=(t=r.element,function(e,n){t.addEventListener(e,n)}),a=function(e){return function(t,n){e.removeEventListener(t,n)}}(r.element);return n.on=function(e,t){o.push({type:e,fn:t}),i(e,t)},n.off=function(e,t){o.splice(o.findIndex(function(n){return n.type===e&&n.fn===t}),1),a(e,t)},{write:function(){return!0},destroy:function(){o.forEach(function(e){a(e.type,e.fn)})}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,o=e.viewInternalAPI,i=e.viewExternalAPI,a=(e.viewState,Object.assign({},n)),u=[];return r(t,function(e,t){var r=I(t);r&&(r.onupdate=function(t){n[e]=t},r.target=a[e],m([{key:e,setter:function(e){r.target!==e&&(r.target=e)},getter:function(){return n[e]}}],[o,i],n,!0),u.push(r))}),{write:function(e){var t=!0;return u.forEach(function(n){n.resting||(t=!1),n.interpolate(e)}),t},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewExternalAPI;m(t,r,n)}},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,i=void 0===r?null:r,a=e.attributes,u=void 0===a?{}:a,p=e.read,d=void 0===p?function(){}:p,E=e.write,_=void 0===E?function(){}:E,T=e.create,I=void 0===T?function(){}:T,m=e.destroy,v=void 0===m?function(){}:m,g=e.filterFrameActionsForChild,R=void 0===g?function(e,t){return t}:g,h=e.didCreateView,y=void 0===h?function(){}:h,S=e.didWriteView,A=void 0===S?function(){}:S,b=e.ignoreRect,L=void 0!==b&&b,P=e.ignoreRectUpdate,M=void 0!==P&&P,C=e.mixins,N=void 0===C?[]:C;return function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=s(n,"filepond--"+i,u),p=window.getComputedStyle(a,null),E=D(),T=null,m=!1,g=[],h=[],S={},b={},P=[_],C=[d],w=[v],G=function(){return a},U=function(){return g.concat()},B=function(){return T||(T=f(E,g,[0,0],[1,1]))},V={element:{get:G},style:{get:function(){return p}},childViews:{get:U}},F=Object.assign({},V,{rect:{get:B},ref:{get:function(){return S}},is:function(e){return i===e},appendChild:(t=a,function(e,n){void 0!==n&&t.children[n]?t.insertBefore(e,t.children[n]):t.appendChild(e)}),createChildView:function(e){return function(t,n){return t(e,n)}}(e),linkView:function(e){return g.push(e),e},unlinkView:function(e){g.splice(g.indexOf(e),1)},appendChildView:l(0,g),removeChildView:c(a,g),registerWriter:function(e){return P.push(e)},registerReader:function(e){return C.push(e)},registerDestroyer:function(e){return w.push(e)},invalidateLayout:function(){return a.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),q={element:{get:G},childViews:{get:U},rect:{get:B},resting:{get:function(){return m}},isRectIgnored:function(){return L},_read:function(){T=null,g.forEach(function(e){return e._read()}),!(M&&E.width&&E.height)&&D(E,a,p);var e={root:Y,props:r,rect:E};C.forEach(function(t){return t(e)})},_write:function(e,t,n){var o=0===t.length;return P.forEach(function(i){!1===i({props:r,root:Y,actions:t,timestamp:e,shouldOptimize:n})&&(o=!1)}),h.forEach(function(t){!1===t.write(e)&&(o=!1)}),g.filter(function(e){return!!e.element.parentNode}).forEach(function(r){r._write(e,R(r,t),n)||(o=!1)}),g.forEach(function(r,i){r.element.parentNode||(Y.appendChild(r.element,i),r._read(),r._write(e,R(r,t),n),o=!1)}),m=o,A({props:r,root:Y,actions:t,timestamp:e}),o},_destroy:function(){h.forEach(function(e){return e.destroy()}),w.forEach(function(e){e({root:Y,props:r})}),g.forEach(function(e){return e._destroy()})}},x=Object.assign({},V,{rect:{get:function(){return E}}});Object.keys(N).sort(function(e,t){return"styles"===e?1:"styles"===t?-1:0}).forEach(function(e){var t=O[e]({mixinConfig:N[e],viewProps:r,viewState:b,viewInternalAPI:F,viewExternalAPI:q,view:o(x)});t&&h.push(t)});var Y=o(F);I({root:Y,props:r});var j=a.children.length;return g.forEach(function(e,t){Y.appendChild(e.element,j+t)}),y(Y),o(q)}},S=function(e,t){return function(n){var r=n.root,o=n.props,i=n.actions,a=void 0===i?[]:i,u=n.timestamp,s=n.shouldOptimize;a.filter(function(t){return e[t.type]}).forEach(function(t){return e[t.type]({root:r,props:o,action:t.data,timestamp:u,shouldOptimize:s})}),t&&t({root:r,props:o,actions:a,timestamp:u,shouldOptimize:s})}},A=function(e,t){return t.parentNode.insertBefore(e,t)},b=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},L=function(e){return Array.isArray(e)},P=function(e){return null==e},M=function(e){return e.trim()},C=function(e){return""+e},N=function(e){return"boolean"==typeof e},w=function(e){return N(e)?e:"true"===e},G=function(e){return"string"==typeof e},U=function(e){return E(e)?e:G(e)?C(e).replace(/[a-z]+/gi,""):0},B=function(e){return parseInt(U(e),10)},V=function(e){return parseFloat(U(e))},F=function(e){return E(e)&&isFinite(e)&&Math.floor(e)===e},q=function(e){if(F(e))return e;var t=C(e).trim();return/MB$/i.test(t)?(t=t.replace(/MB$i/,"").trim(),1e3*B(t)*1e3):/KB/i.test(t)?(t=t.replace(/KB$i/,"").trim(),1e3*B(t)):B(t)},x=function(e){return"function"==typeof e},Y={process:"POST",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},j=function(e,t,n,r){if(null===t)return null;if("function"==typeof t)return t;var o={url:"GET"===n?"?"+e+"=":"",method:n,headers:{},withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(G(t))return o.url=t,o;if(Object.assign(o,t),G(o.headers)){var i=o.headers.split(/:(.+)/);o.headers={header:i[0],value:i[1]}}return o.withCredentials=w(o.withCredentials),o},H=function(e){return"object"==typeof e&&null!==e},X=function(e){return L(e)?"array":function(e){return null===e}(e)?"null":F(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":function(e){return H(e)&&G(e.url)&&H(e.process)&&H(e.revert)&&H(e.restore)&&H(e.fetch)}(e)?"api":typeof e},W={array:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return P(e)?[]:L(e)?e:C(e).split(t).map(M).filter(function(e){return e.length})},boolean:w,int:function(e){return"bytes"===X(e)?q(e):B(e)},number:V,float:V,bytes:q,string:function(e){return x(e)?e:C(e)},function:function(e){return function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t}(e)},serverapi:function(e){return(n={}).url=G(t=e)?t:t.url||"",n.timeout=t.timeout?parseInt(t.timeout,10):0,r(Y,function(e){n[e]=j(e,t[e],Y[e],n.timeout)}),n.remove=t.remove||null,n;var t,n},object:function(e){try{return JSON.parse(e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(e){return null}}},z=function(e,t,n){if(e===t)return e;var r,o=X(e);if(o!==n){var i=(r=e,W[n](r));if(o=X(i),null===i)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=i}return e},k=function(e){var t={};return r(e,function(n){var r,o,i,a=e[n];t[n]=(r=a[0],o=a[1],i=r,{enumerable:!0,get:function(){return i},set:function(e){i=z(e,r,o)}})}),o(t)},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()}).join(t)},Z=function(e){return function(t,n,o){var i={};return r(e,function(e){var n=Q(e,"_").toUpperCase();i["SET_"+n]=function(r){try{o.options[e]=r.value}catch(e){}t("DID_SET_"+n,{value:o.options[e]})}}),i}},$=function(e){return function(t){var n={};return r(e,function(e){n["GET_"+Q(e,"_").toUpperCase()]=function(n){return t.options[e]}}),n}},K=1,J=2,ee=3,te=4,ne=5,re=function(){return Math.random().toString(36).substr(2,9)},oe=function(e,t){return e.splice(t,1)},ie=function(){var e=[],t=function(t,n){oe(e,e.findIndex(function(e){return e.event===t&&(e.cb===n||!n)}))};return{fire:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;oBrowse',de.STRING],labelInvalidField:["Field contains invalid files",de.STRING],labelFileWaitingForSize:["Waiting for size",de.STRING],labelFileSizeNotAvailable:["Size not available",de.STRING],labelFileCountSingular:["file in list",de.STRING],labelFileCountPlural:["files in list",de.STRING],labelFileLoading:["Loading",de.STRING],labelFileAdded:["Added",de.STRING],labelFileLoadError:["Error during load",de.STRING],labelFileRemoved:["Removed",de.STRING],labelFileRemoveError:["Error during remove",de.STRING],labelFileProcessing:["Uploading",de.STRING],labelFileProcessingComplete:["Upload complete",de.STRING],labelFileProcessingAborted:["Upload cancelled",de.STRING],labelFileProcessingError:["Error during upload",de.STRING],labelFileProcessingRevertError:["Error during revert",de.STRING],labelTapToCancel:["tap to cancel",de.STRING],labelTapToRetry:["tap to retry",de.STRING],labelTapToUndo:["tap to undo",de.STRING],labelButtonRemoveItem:["Remove",de.STRING],labelButtonAbortItemLoad:["Abort",de.STRING],labelButtonRetryItemLoad:["Retry",de.STRING],labelButtonAbortItemProcessing:["Cancel",de.STRING],labelButtonUndoItemProcessing:["Undo",de.STRING],labelButtonRetryItemProcessing:["Retry",de.STRING],labelButtonProcessItem:["Upload",de.STRING],iconRemove:['',de.STRING],iconProcess:['',de.STRING],iconRetry:['',de.STRING],iconUndo:['',de.STRING],iconDone:['',de.STRING],oninit:[null,de.FUNCTION],onwarning:[null,de.FUNCTION],onerror:[null,de.FUNCTION],onactivatefile:[null,de.FUNCTION],onaddfilestart:[null,de.FUNCTION],onaddfileprogress:[null,de.FUNCTION],onaddfile:[null,de.FUNCTION],onprocessfilestart:[null,de.FUNCTION],onprocessfileprogress:[null,de.FUNCTION],onprocessfileabort:[null,de.FUNCTION],onprocessfilerevert:[null,de.FUNCTION],onprocessfile:[null,de.FUNCTION],onprocessfiles:[null,de.FUNCTION],onremovefile:[null,de.FUNCTION],onpreparefile:[null,de.FUNCTION],onupdatefiles:[null,de.FUNCTION],beforeDropFile:[null,de.FUNCTION],beforeAddFile:[null,de.FUNCTION],beforeRemoveFile:[null,de.FUNCTION],stylePanelLayout:[null,de.STRING],stylePanelAspectRatio:[null,de.STRING],styleItemPanelAspectRatio:[null,de.STRING],styleButtonRemoveItemPosition:["left",de.STRING],styleButtonProcessItemPosition:["right",de.STRING],styleLoadIndicatorPosition:["right",de.STRING],styleProgressIndicatorPosition:["right",de.STRING],files:[[],de.ARRAY]},ge=function(e,t){return P(t)?e[0]||null:F(t)?e[t]||null:("object"==typeof t&&(t=t.id),e.find(function(e){return e.id===t})||null)},Re=function(e){if(P(e))return e;if(/:/.test(e)){var t=e.split(":");return t[1]/t[0]}return parseFloat(e)},he=function(e){return e.filter(function(e){return!e.archived})},Oe={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},De=[le.LOAD_ERROR,le.PROCESSING_ERROR,le.PROCESSING_REVERT_ERROR],ye=[le.LOADING,le.PROCESSING,le.PROCESSING_QUEUED,le.INIT],Se=[le.PROCESSING_COMPLETE],Ae=function(e){return De.includes(e.status)},be=function(e){return ye.includes(e.status)},Le=function(e){return Se.includes(e.status)},Pe=function(e){return{GET_STATUS:function(){var t=he(e.items),n=Oe.EMPTY,r=Oe.ERROR,o=Oe.BUSY,i=Oe.IDLE,a=Oe.READY;return 0===t.length?n:t.some(Ae)?r:t.some(be)?o:t.some(Le)?a:i},GET_ITEM:function(t){return ge(e.items,t)},GET_ACTIVE_ITEM:function(t){return ge(he(e.items),t)},GET_ACTIVE_ITEMS:function(t){return he(e.items)},GET_ITEMS:function(t){return e.items},GET_ITEM_NAME:function(t){var n=ge(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=ge(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter(function(e){return/^style/.test(e)}).map(function(t){return{name:t,value:e.options[t]}})},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:Re(e.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return e.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(t){return he(e.items).filter(function(e){return e.status===t})},GET_TOTAL_ITEMS:function(){return he(e.items).length},IS_ASYNC:function(){return H(e.options.server)&&(H(e.options.server.process)||x(e.options.server.process))}}},Me=function(e,t,n){return P(t)?null:void 0===n?(e.push(t),t):(r=n,o=0,i=e.length,function(e,t,n){e.splice(t,0,n)}(e,n=Math.max(Math.min(i,r),o),t),t);var r,o,i},Ce=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},Ne=function(e){return e.split("/").pop().split("?").shift()},we=function(e){return e.split(".").pop()},Ge=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+Ge(e.getMonth()+1,"00")+"-"+Ge(e.getDate(),"00")+"_"+Ge(e.getHours(),"00")+"-"+Ge(e.getMinutes(),"00")+"-"+Ge(e.getSeconds(),"00")},Be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return o.lastModifiedDate=new Date,G(t)||(t=Ue()),t&&null===r&&we(t)?o.name=t:(r=r||function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""}(o.type),o.name=t+(r?"."+r:"")),o},Ve=function(e,t){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},Fe=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},qe=function(e){var t=Fe(e);return function(e,t){for(var n=new ArrayBuffer(e.length),r=new Uint8Array(n),o=0;o=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){o=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,t,!0),F(n.timeout)&&(a.timeout=n.timeout),Object.keys(n.headers).forEach(function(e){a.setRequestHeader(e,n.headers[e])}),n.responseType&&(a.responseType=n.responseType),n.withCredentials&&(a.withCredentials=!0),a.send(e),r},ke=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},Qe=function(e){return function(t){e(ke("error",0,"Timeout",t.getAllResponseHeaders()))}},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!G(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,i,a,u,s,l){var c=ze(o,e+t.url,Object.assign({},t,{responseType:"blob"}));return c.onload=function(e){var t=e.getAllResponseHeaders(),r=He(t).name||Ne(o);i(ke("load",e.status,Be(n(e.response),r),t))},c.onerror=function(e){a(ke("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},c.onheaders=function(e){l(ke("headers",e.status,null,e.getAllResponseHeaders()))},c.ontimeout=Qe(a),c.onprogress=u,c.onabort=s,c}},$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!G(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,i,a){var u=ze(o,e+t.url,t);return u.onload=function(e){i(ke("load",e.status,n(e.response),e.getAllResponseHeaders()))},u.onerror=function(e){a(ke("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},u.ontimeout=Qe(a),u}},Ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},Je=function(e){var t={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){t.request&&(t.perceivedPerformanceUpdater.clear(),t.request.abort(),t.complete=!0)},r=Object.assign({},ie(),{process:function(n,o){var i=function(){0!==t.duration&&null!==t.progress&&r.fire("progress",r.getProgress())},a=function(){t.complete=!0,r.fire("load-perceived",t.response.body)};r.fire("start"),t.timestamp=Date.now(),t.perceivedPerformanceUpdater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]?arguments[3]:25),r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=null,i=Date.now();return function a(){var u=Date.now()-i,s=Ke(n,r);u+s>t&&(s=u+s-t);var l=u/t;l>=1?e(1):(e(l),o=setTimeout(a,s))}(),{clear:function(){clearTimeout(o)}}}(function(e){t.perceivedProgress=e,t.perceivedDuration=Date.now()-t.timestamp,i(),t.response&&1===t.perceivedProgress&&!t.complete&&a()},Ke(750,1500)),t.request=e(n,o,function(e){t.response=H(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=Date.now()-t.timestamp,t.progress=1,r.fire("load",t.response.body),1===t.perceivedProgress&&a()},function(e){t.perceivedPerformanceUpdater.clear(),r.fire("error",H(e)?e:{type:"error",code:0,body:""+e})},function(e,n,r){t.duration=Date.now()-t.timestamp,t.progress=e?n/r:null,i()},function(){t.perceivedPerformanceUpdater.clear(),r.fire("abort",t.response?t.response.body:null)})},abort:n,getProgress:function(){return t.progress?Math.min(t.progress,t.perceivedProgress):null},getDuration:function(){return Math.min(t.duration,t.perceivedDuration)},reset:function(){n(),t.complete=!1,t.perceivedProgress=0,t.progress=0,t.timestamp=null,t.perceivedDuration=0,t.duration=0,t.request=null,t.response=null}});return r},et=function(e){return e.substr(0,e.lastIndexOf("."))||e},tt=function(e){return!!(e instanceof File||e instanceof Blob&&e.name)},nt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=re(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:t,status:t?le.PROCESSING_COMPLETE:le.INIT,activeLoader:null,activeProcessor:null},a=null,u={},s=function(e){return i.status=e},l=function(e){if(!i.released&&!i.frozen){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,o=n.success,i=void 0===o?function(){}:o,a=n.failure,u=void 0===a?function(){}:a,s=ge(e.items,r);s?t(s,i,u):u({error:ke("error",0,"Item not found"),file:null})}},ft=function(e,t,n){return{ABORT_ALL:function(){he(n.items).forEach(function(e){e.freeze(),e.abortLoad(),e.abortProcessing()})},DID_SET_FILES:function(t){var r=t.value,o=(void 0===r?[]:r).map(function(e){return{source:e.source?e.source:e,options:e.options}}),i=he(n.items);i.forEach(function(t){o.find(function(e){return e.source===t.source||e.source===t.file})||e("REMOVE_ITEM",{query:t})}),i=he(n.items),o.forEach(function(t,n){i.find(function(e){return e.source===t.source||e.file===t.source})||e("ADD_ITEM",Object.assign({},t,{interactionMethod:ne,index:n}))})},DID_UPDATE_ITEM_METADATA:function(r){var o=r.id;clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout(function(){var r=rt(n.items,o);if(t("IS_ASYNC")){var i,a=function(){setTimeout(function(){e("REQUEST_ITEM_PROCESSING",{query:o})},32)};return r.status===le.PROCESSING_COMPLETE?(i=n.options.instantUpload,void r.revert($e(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(i?a:function(){}).catch(function(){})):r.status===le.PROCESSING?function(e){r.abortProcessing().then(e?a:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&a())}_e("SHOULD_PREPARE_OUTPUT",!1,{item:r,query:t}).then(function(t){t&&e("REQUEST_PREPARE_OUTPUT",{query:o,item:r,ready:function(t){e("DID_PREPARE_OUTPUT",{id:o,file:t})}},!0)})},0)},SORT:function(e){var t=e.compare;lt(n,t)},ADD_ITEMS:function(n){var r=n.items,o=n.index,i=n.interactionMethod,a=n.success,u=void 0===a?function(){}:a,s=n.failure,l=void 0===s?function(){}:s,c=o;if(-1===o||void 0===o){var f=t("GET_ITEM_INSERT_LOCATION"),p=t("GET_TOTAL_ITEMS");c="before"===f?0:p}var d=t("GET_IGNORED_FILES"),E=r.filter(function(e){return tt(e)?!d.includes(e.name.toLowerCase()):!P(e)}).map(function(t){return new Promise(function(n,r){e("ADD_ITEM",{interactionMethod:i,source:t.source||t,success:n,failure:r,index:c++,options:t.options||{}})})});Promise.all(E).then(u).catch(l)},ADD_ITEM:function(r){var o=r.source,i=r.index,a=void 0===i?-1:i,u=r.interactionMethod,s=r.success,l=void 0===s?function(){}:s,c=r.failure,f=void 0===c?function(){}:c,p=r.options,d=void 0===p?{}:p;if(P(o))f({error:ke("error",0,"No source"),file:null});else if(!tt(o)||!n.options.ignoredFiles.includes(o.name.toLowerCase())){if(!function(e){var t=he(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:g,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void f({error:t,file:se(m)});e("DID_THROW_ITEM_LOAD_ERROR",{id:g,error:t,status:{main:r,sub:n.options.labelTapToRetry}})}),m.on("load-file-error",function(t){e("DID_THROW_ITEM_INVALID",{id:g,error:t.status,status:t.status}),f({error:t.status,file:se(m)})}),m.on("load-abort",function(){e("REMOVE_ITEM",{query:g})}),m.on("load-skip",function(){e("COMPLETE_LOAD_ITEM",{query:g,item:m,data:{source:o,success:l}})}),m.on("load",function(){var r=function(r){r?(m.on("metadata-update",function(t){e("DID_UPDATE_ITEM_METADATA",{id:g,change:t})}),_e("SHOULD_PREPARE_OUTPUT",!1,{item:m,query:t}).then(function(t){var r=function(){e("COMPLETE_LOAD_ITEM",{query:g,item:m,data:{source:o,success:l}}),ut(e,n)};t?e("REQUEST_PREPARE_OUTPUT",{query:g,item:m,ready:function(t){e("DID_PREPARE_OUTPUT",{id:g,file:t}),r()}},!0):r()})):e("REMOVE_ITEM",{query:g})};_e("DID_LOAD_ITEM",m,{query:t,dispatch:e}).then(function(){st(t("GET_BEFORE_ADD_FILE"),se(m)).then(r)}).catch(function(){r(!1)})}),m.on("process-start",function(){e("DID_START_ITEM_PROCESSING",{id:g})}),m.on("process-progress",function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:g,progress:t})}),m.on("process-error",function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:g,error:t,status:{main:at(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})}),m.on("process-revert-error",function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:g,error:t,status:{main:at(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})}),m.on("process-complete",function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:g,error:null,serverFileReference:t})}),m.on("process-abort",function(){e("DID_ABORT_ITEM_PROCESSING",{id:g})}),m.on("process-revert",function(){e("DID_REVERT_ITEM_PROCESSING",{id:g})}),e("DID_ADD_ITEM",{id:g,index:a,interactionMethod:u}),ut(e,n);var R=n.options.server||{},h=R.url,O=R.load,D=R.restore,y=R.fetch;m.load(o,Xe(I===ce.INPUT?G(o)&&function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&it(location.href)!==it(e)}(o)?Ze(h,y):ot:Ze(h,I===ce.LIMBO?D:O)),function(e,n,r){_e("LOAD_FILE",e,{query:t}).then(n).catch(r)})}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,r=e.ready;n.archived||_e("PREPARE_OUTPUT",n.file,{query:t,item:n}).then(function(e){_e("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then(function(e){n.archived||r(e)})})},COMPLETE_LOAD_ITEM:function(r){var o=r.item,i=r.data,a=i.success,u=i.source,s=t("GET_ITEM_INSERT_LOCATION");x(s)&&u&<(n,s),e("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.origin===ce.INPUT?null:u}),a(se(o)),o.origin!==ce.LOCAL?o.origin!==ce.LIMBO?t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:o.id}):e("DID_COMPLETE_ITEM_PROCESSING",{id:o.id,error:null,serverFileReference:u}):e("DID_LOAD_LOCAL_ITEM",{id:o.id})},RETRY_ITEM_LOAD:ct(n,function(e){e.retryLoad()}),REQUEST_ITEM_PROCESSING:ct(n,function(r,o,i){if(r.status===le.IDLE||r.status===le.PROCESSING_ERROR)r.status!==le.PROCESSING_QUEUED&&(r.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),e("PROCESS_ITEM",{query:r,success:o,failure:i},!0));else{var a=function(){setTimeout(function(){e("REQUEST_ITEM_PROCESSING",{query:r,success:o,failure:i})},32)};r.status===le.PROCESSING_COMPLETE||r.status===le.PROCESSING_REVERT_ERROR?r.revert($e(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(a).catch(function(){}):r.status===le.PROCESSING&&r.abortProcessing().then(a)}}),PROCESS_ITEM:ct(n,function(r,o,i){var a=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",le.PROCESSING).length!==a){if(r.status!==le.PROCESSING){var u=function t(){var r=n.processingQueue.shift();if(r){var o=r.id,i=r.success,a=r.failure,u=ge(n.items,o);u&&!u.archived?e("PROCESS_ITEM",{query:o,success:i,failure:a},!0):t()}};r.onOnce("process-complete",function(){o(se(r)),u(),t("GET_ITEMS_BY_STATUS",le.PROCESSING_COMPLETE).length===n.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")}),r.onOnce("process-error",function(e){i({error:e,file:se(r)}),u()}),r.process(Je(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return"function"==typeof t?function(){for(var e=arguments.length,r=new Array(e),o=0;or&&o-r<=.5&&(i=0),r>o&&r-o>=.5&&(i=0),function(e,t,n,r,o,i){var a=_t(e,t,n,o),u=_t(e,t,n,r);return["M",a.x,a.y,"A",n,n,0,i,0,u.x,u.y].join(" ")}(e,t,n,360*Math.min(.9999,r),360*Math.min(.9999,o),i)},It=y({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=s("svg");t.ref.path=s("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(t.ref.path),t.ref.svg=r,t.appendChild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseInt(i(t.ref.path,"stroke-width"),10),o=.5*t.rect.element.width,a=0,u=0;n.spin?(a=0,u=.5):(a=0,u=n.progress);var s=Tt(o,o,o-r,a,u);i(t.ref.path,"d",s),i(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),mt=y({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.innerHTML=(n.icon||"")+""+n.label+"",n.isDisabled=!1},write:function(e){var t=e.root,n=e.props,r=n.isDisabled,o=t.query("GET_DISABLED")||0===n.opacity;o&&!r?(n.isDisabled=!0,i(t.element,"disabled","disabled")):!o&&r&&(n.isDisabled=!1,t.element.removeAttribute("disabled"))}}),vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(e=Math.round(Math.abs(e)))<1e3?e+" bytes":e0&&(t.height=t.ref.container.rect.element.height)),o&&(t.ref.panel.height=null),t.ref.panel.height=t.height},destroy:function(e){var t=e.root,n=e.props;t.element.removeEventListener("click",t.ref.handleClick),t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:Zt,translateY:Zt,opacity:{type:"tween",duration:150}}}}),en=function(e,t){if(t){var n=e.rect.element.width,r=e.childViews,o=r.length,i=null;if(0===o||t.topm){if(t.left3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;e.translateX=t,e.translateY=n,Date.now()>e.spawnDate&&(0===e.opacity&&nn(e,t,n,r,o),e.scaleX=1,e.scaleY=1,e.opacity=1)},nn=function(e,t,n,r,o){e.interactionMethod===ne?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=n):e.interactionMethod===J?(e.translateX=null,e.translateX=t-20*r,e.translateY=null,e.translateY=n-10*o,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===ee?(e.translateY=null,e.translateY=n-30):e.interactionMethod===K&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},rn=S({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=n.id,o=n.index,i=n.interactionMethod;t.ref.addIndex=o;var a=Date.now(),u=a,s=1;if(i!==ne){s=0;var l=t.query("GET_ITEM_INSERT_INTERVAL"),c=a-t.ref.lastItemSpanwDate;u=c3&&void 0!==arguments[3]?arguments[3]:"";n?i(e,t,r):e.removeAttribute(t)},ln=function(e){var t=e.root,n=(e.action,t.query("GET_DISABLED")),r=t.query("GET_ALLOW_BROWSE"),o=n||!r;sn(t.element,"disabled",o)},cn=function(e){var t=e.root,n=t.element;t.query("GET_TOTAL_ITEMS")>0?(sn(n,"required",!1),sn(n,"name",!1)):(sn(n,"name",!0,t.query("GET_NAME")),t.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),t.query("GET_REQUIRED")&&sn(n,"required",!0))},fn=y({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,i(t.element,"name",t.query("GET_NAME")),i(t.element,"aria-controls","filepond--assistant-"+n.id),i(t.element,"aria-labelledby","filepond--drop-label-"+n.id),t.ref.handleChange=function(e){if(t.element.value){var r=Array.from(t.element.files);setTimeout(function(){n.onload(r),function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=dt("form"),n=e.parentNode,r=e.nextSibling;t.appendChild(e),t.reset(),r?n.insertBefore(e,r):n.appendChild(e)}}}(t.element)},250)}},t.element.addEventListener("change",t.ref.handleChange)},destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:S({DID_LOAD_ITEM:cn,DID_REMOVE_ITEM:cn,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:ln,DID_SET_ALLOW_BROWSE:ln,DID_SET_ALLOW_MULTIPLE:function(e){var t=e.root,n=e.action;sn(t.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(e){var t=e.root,n=e.action;sn(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(e){var t=e.root,n=e.action;sn(t.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&sn(t.element,"required",!0):sn(t.element,"required",!1)}})}),pn=13,dn=32,En=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&i(n,"tabindex","0"),t},_n=y({name:"drop-label",ignoreRect:!0,create:function(e){var t=e.root,n=e.props,r=dt("label");i(r,"for","filepond--browser-"+n.id),i(r,"id","filepond--drop-label-"+n.id),i(r,"aria-hidden","true"),r.addEventListener("keydown",function(e){(e.keyCode===pn||e.keyCode===dn)&&(e.preventDefault(),t.ref.label.click())}),t.element.addEventListener("click",function(e){e.target===r||r.contains(e.target)||t.ref.label.click()}),En(r,n.caption),t.appendChild(r),t.ref.label=r},write:S({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;En(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Tn=y({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),In=S({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(Tn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))}({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),mn=y({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(e){var t=e.root,n=e.props,r=e.actions;In({root:t,props:n,actions:r});var o=t.ref.blob;0===r.length&&o&&0===o.opacity&&(t.removeChildView(o),t.ref.blob=null)}}),vn=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],gn=["css","csv","html","txt"],Rn={zip:"zip|compressed",epub:"application/epub+zip"},hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),vn.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):gn.includes(e)?"text/"+e:Rn[e]||null},On=function(e){return new Promise(function(t,n){var r=Cn(e);r.length?t(r):Dn(e).then(t)})},Dn=function(e){return new Promise(function(t,n){var r=(e.items?Array.from(e.items):[]).filter(function(e){return yn(e)}).map(function(e){return Sn(e)});r.length?Promise.all(r).then(function(e){var n=[];e.forEach(function(e){n.push.apply(n,e)}),t(n.filter(function(e){return e}))}):t(e.files?Array.from(e.files):[])})},yn=function(e){if(Pn(e)){var t=Mn(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},Sn=function(e){return new Promise(function(t,n){Ln(e)?An(Mn(e)).then(t):t([e.getAsFile()])})},An=function(e){return new Promise(function(t,n){var r=[],o=0;!function e(n){n.createReader().readEntries(function(n){n.forEach(function(n){n.isDirectory?e(n):(o++,n.file(function(e){r.push(bn(e)),o===r.length&&t(r)}))})})}(e)})},bn=function(e){if(e.type.length)return e;var t=e.lastModifiedDate,n=e.name;return(e=e.slice(0,e.size,hn(we(e.name)))).name=n,e.lastModifiedDate=t,e},Ln=function(e){return Pn(e)&&(Mn(e)||{}).isDirectory},Pn=function(e){return"webkitGetAsEntry"in e},Mn=function(e){return e.webkitGetAsEntry()},Cn=function(e){var t=[];try{if((t=wn(e)).length)return t;t=Nn(e)}catch(e){}return t},Nn=function(e){var t=e.getData("url");return"string"==typeof t&&t.length?[t]:[]},wn=function(e){var t=e.getData("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},Gn=[],Un=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},Bn=function(e){var t=Gn.find(function(t){return t.element===e});if(t)return t;var n=Vn(e);return Gn.push(n),n},Vn=function(e){var t=[],n={dragenter:Yn,dragover:jn,dragleave:Xn,drop:Hn},o={};r(n,function(n,r){o[n]=r(e,t),e.addEventListener(n,o[n],!1)});var i={element:e,addListener:function(a){return t.push(a),function(){t.splice(t.indexOf(a),1),0===t.length&&(Gn.splice(Gn.indexOf(i),1),r(n,function(t){e.removeEventListener(t,o[t],!1)}))}}};return i},Fn=function(e,t){var n,r=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)}("getRootNode"in(n=t)?n.getRootNode():document,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return r===t||t.contains(r)},qn=null,xn=function(e,t){try{e.dropEffect=t}catch(e){}},Yn=function(e,t){return function(e){e.preventDefault(),qn=e.target,t.forEach(function(t){var n=t.element,r=t.onenter;Fn(e,n)&&(t.state="enter",r(Un(e)))})}},jn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;On(n).then(function(r){var o=!1;t.some(function(t){var i=t.filterElement,a=t.element,u=t.onenter,s=t.onexit,l=t.ondrag,c=t.allowdrop;xn(n,"copy");var f=c(r);if(f)if(Fn(e,a)){if(o=!0,null===t.state)return t.state="enter",void u(Un(e));if(t.state="over",i&&!f)return void xn(n,"none");l(Un(e))}else i&&!o&&xn(n,"none"),t.state&&(t.state=null,s(Un(e)));else xn(n,"none")})})}},Hn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;On(n).then(function(n){t.forEach(function(t){var r=t.filterElement,o=t.element,i=t.ondrop,a=t.onexit,u=t.allowdrop;t.state=null,u(n)?r&&!Fn(e,o)||i(Un(e),n):a(Un(e))})})}},Xn=function(e,t){return function(e){qn===e.target&&t.forEach(function(t){var n=t.onexit;t.state=null,n(Un(e))})}},Wn=function(e,t,n){e.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,o=n.requiresDropOnElement,i=n.filterItems,a=void 0===i?function(e){return e}:i,u=function(e,t,n){var r=Bn(t),o={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return o.destroy=r.addListener(o),o}(e,r?document.documentElement:e,o),s="",l="";u.allowdrop=function(e){return t(a(e))},u.ondrop=function(e,n){var r=a(n);t(r)?(l="drag-drop",c.onload(r,e)):c.ondragend(e)},u.ondrag=function(e){c.ondrag(e)},u.onenter=function(e){l="drag-over",c.ondragstart(e)},u.onexit=function(e){l="drag-exit",c.ondragend(e)};var c={updateHopperState:function(){s!==l&&(e.dataset.hopperState=l,s=l)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){u.destroy()}};return c},zn=!1,kn=[],Qn=function(e){On(e.clipboardData).then(function(e){e.length&&kn.forEach(function(t){return t(e)})})},Zn=function(){var e=function(e){t.onload(e)},t={destroy:function(){var t;t=e,oe(kn,kn.indexOf(t)),0===kn.length&&(document.removeEventListener("paste",Qn),zn=!1)},onload:function(){}};return function(e){kn.includes(e)||(kn.push(e),zn||(zn=!0,document.addEventListener("paste",Qn)))}(e),t},$n=null,Kn=null,Jn=[],er=function(e,t){e.element.textContent=t},tr=function(e,t,n){var r=e.query("GET_TOTAL_ITEMS");er(e,n+" "+t+", "+r+" "+(1===r?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Kn),Kn=setTimeout(function(){!function(e){e.element.textContent=""}(e)},1500)},nr=function(e){return e.element.parentNode.contains(document.activeElement)},rr=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");er(t,r+" "+o)},or=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename;er(t,n.status.main+" "+r+" "+n.status.sub)},ir=y({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,i(t.element,"role","status"),i(t.element,"aria-live","polite"),i(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:S({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(nr(t)){t.element.textContent="";var r=t.query("GET_ITEM",n.id);Jn.push(r.filename),clearTimeout($n),$n=setTimeout(function(){tr(t,Jn.join(", "),t.query("GET_LABEL_FILE_ADDED")),Jn.length=0},750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(nr(t)){var r=n.item;tr(t,r.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");er(t,r+" "+o)},DID_ABORT_ITEM_PROCESSING:rr,DID_REVERT_ITEM_PROCESSING:rr,DID_THROW_ITEM_REMOVE_ERROR:or,DID_THROW_ITEM_LOAD_ERROR:or,DID_THROW_ITEM_INVALID:or,DID_THROW_ITEM_PROCESSING_ERROR:or}),tag:"span",name:"assistant"}),ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),function(e){return e.charAt(1).toUpperCase()})},ur=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),o=null;return function(){for(var i=arguments.length,a=new Array(i),u=0;u=0?1:0,E=i.find(function(e){return e.markedForRemoval&&e.opacity<.45})?-1:0,_=i.length+d+E,T=Math.round(a/f);return 1===T?i.forEach(function(e){var r=e.rect.element.height+l;n+=r,t+=r*e.opacity}):(n=Math.ceil(_/T)*p,t=n),{visual:t,bounds:n}},cr=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},fr=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),r=e.query("GET_ALLOW_MULTIPLE"),o=e.query("GET_TOTAL_ITEMS"),i=e.query("GET_MAX_FILES"),a=t.length;return!r&&a>1||!!(F(i=r?i:n?i:1)&&o+a>i)&&(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:ke("warning",0,"Max files")}),!0)},pr=function(e,t){var n=e.childViews[0];return en(n,{left:t.scopeLeft-n.rect.element.left,top:t.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},dr=function(e){var t=e.query("GET_ALLOW_DROP"),n=e.query("GET_DISABLED"),r=t&&!n;if(r&&!e.ref.hopper){var o=Wn(e.element,function(t){if(fr(e,t))return!1;var n=e.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!e.query("GET_DROP_VALIDATION")||t.every(function(t){return Te("ALLOW_HOPPER_ITEM",t,{query:e.query}).every(function(e){return!0===e})&&n(t)})},{filterItems:function(t){var n=e.query("GET_IGNORED_FILES");return t.filter(function(e){return!tt(e)||!n.includes(e.name.toLowerCase())})},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});o.onload=function(t,n){e.dispatch("ADD_ITEMS",{items:t,index:pr(e.ref.list,n),interactionMethod:J}),e.dispatch("DID_DROP",{position:n}),e.dispatch("DID_END_DRAG",{position:n})},o.ondragstart=function(t){e.dispatch("DID_START_DRAG",{position:t})},o.ondrag=ur(function(t){e.dispatch("DID_DRAG",{position:t})}),o.ondragend=function(t){e.dispatch("DID_END_DRAG",{position:t})},e.ref.hopper=o,e.ref.drip=e.appendChildView(e.createChildView(mn))}else!r&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},Er=function(e,t){var n=e.query("GET_ALLOW_BROWSE"),r=e.query("GET_DISABLED"),o=n&&!r;o&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(fn,Object.assign({},t,{onload:function(t){if(fr(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:ee})}})),0):!o&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},_r=function(e){var t=e.query("GET_ALLOW_PASTE"),n=e.query("GET_DISABLED"),r=t&&!n;r&&!e.ref.paster?(e.ref.paster=Zn(),e.ref.paster.onload=function(t){e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:te})}):!r&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},Tr=S({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;Er(t,n)},DID_SET_ALLOW_DROP:function(e){var t=e.root;dr(t)},DID_SET_ALLOW_PASTE:function(e){var t=e.root;_r(t)},DID_SET_DISABLED:function(e){var t=e.root,n=e.props;dr(t),_r(t),Er(t,n),t.query("GET_DISABLED")?t.element.dataset.disabled="disabled":delete t.element.dataset.disabled}}),Ir=y({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:function(e){var t=e.root,n=e.props,r=t.query("GET_ID");r&&(t.element.id=r);var o=t.query("GET_CLASS_NAME");o&&o.split(" ").forEach(function(e){t.element.classList.add(e)}),t.ref.label=t.appendChildView(t.createChildView(_n,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(un,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(Qt,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(ir,Object.assign({},n))),t.ref.measure=dt("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter(function(e){return!P(e.value)}).map(function(e){var n=e.name,r=e.value;t.element.dataset[n]=r}),t.ref.widthPrevious=null,t.ref.widthUpdated=ur(function(){t.ref.updateHistory=[],t.dispatch("DID_RESIZE_ROOT")},250),t.ref.previousAspectRatio=null,t.ref.updateHistory=[]},write:function(e){var t=e.root,n=e.props,r=e.actions;if(Tr({root:t,props:n,actions:r}),r.filter(function(e){return/^DID_SET_STYLE_/.test(e.type)}).filter(function(e){return!P(e.data.value)}).map(function(e){var n=e.type,r=e.data,o=ar(n.substr(8).toLowerCase(),"_");t.element.dataset[o]=r.value,t.invalidateLayout()}),!t.rect.element.hidden){t.rect.element.width!==t.ref.widthPrevious&&(t.ref.widthPrevious=t.rect.element.width,t.ref.widthUpdated());var o=t.ref.bounds;o||(o=t.ref.bounds=cr(t),t.element.removeChild(t.ref.measure),t.ref.measure=null);var i=t.ref,a=i.hopper,u=i.label,s=i.list,l=i.panel;a&&a.updateHopperState();var c=t.query("GET_PANEL_ASPECT_RATIO"),f=t.query("GET_ALLOW_MULTIPLE"),p=t.query("GET_TOTAL_ITEMS"),d=p===(f?t.query("GET_MAX_FILES")||1e6:1),E=r.find(function(e){return"DID_ADD_ITEM"===e.type});if(d&&E){var _=E.data.interactionMethod;u.opacity=0,f?u.translateY=-40:_===K?u.translateX=40:u.translateY=_===ee?40:30}else d||(u.opacity=1,u.translateX=0,u.translateY=0);var T=sr(t),I=lr(t),m=u.rect.element.height,v=!f||d?0:m,g=d?s.rect.element.marginTop:0,R=0===p?0:s.rect.element.marginBottom,h=v+g+I.visual+R,O=v+g+I.bounds+R;if(s.translateY=Math.max(0,v-s.rect.element.marginTop)-T.top,c){var D=t.rect.element.width,y=D*c;c!==t.ref.previousAspectRatio&&(t.ref.previousAspectRatio=c,t.ref.updateHistory=[]);var S=t.ref.updateHistory;if(S.push(D),S.length>4)for(var A=S.length,b=A-10,L=0,M=A;M>=b;M--)if(S[M]===S[M-2]&&L++,L>=2)return;l.scalable=!1,l.height=y;var C=y-v-(R-T.bottom)-(d?g:0);I.visual>C?s.overflow=C:s.overflow=null,t.height=y}else if(o.fixedHeight){l.scalable=!1;var N=o.fixedHeight-v-(R-T.bottom)-(d?g:0);I.visual>N?s.overflow=N:s.overflow=null}else if(o.cappedHeight){var w=h>=o.cappedHeight,G=Math.min(o.cappedHeight,h);l.scalable=!0,l.height=w?G:G-T.top-T.bottom;var U=G-v-(R-T.bottom)-(d?g:0);h>o.cappedHeight&&I.visual>U?s.overflow=U:s.overflow=null,t.height=Math.min(o.cappedHeight,O-T.top-T.bottom)}else{var B=p>0?T.top+T.bottom:0;l.scalable=!0,l.height=Math.max(m,h-B),t.height=Math.max(m,O-B)}}},destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy()},mixins:{styles:["height"]}}),mr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,n=me(),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},e),o=[],i=[],a=function(e,t,n){n?i.push({type:e,data:t}):(c[e]&&c[e](t),o.push({type:e,data:t}))},u=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){h([{source:e,options:t}],{index:t.index}).then(function(e){return n(e&&e[0])}).catch(r)})},addFiles:h,getFile:function(e){return i.query("GET_ACTIVE_ITEM",e)},processFile:D,removeFile:R,getFiles:O,processFiles:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t={};return r(me(),function(e,n){t[e]=n[0]}),mr(Object.assign({},t,e))},gr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];r(e.attributes,function(t){n.push(e.attributes[t])});var o=n.filter(function(e){return e.name}).reduce(function(t,n){var r,o=i(e,n.name);return t[(r=n.name,ar(r.replace(/^data-/,"")))]=o===n.name||o,t},{});return function e(t,n){r(n,function(n,o){r(t,function(e,r){var i=new RegExp(n);if(i.test(e)&&(delete t[e],!1!==o))if(G(o))t[o]=r;else{var a,u=o.group;H(o)&&!t[u]&&(t[u]={}),t[u][(a=e.replace(i,""),a.charAt(0).toLowerCase()+a.slice(1))]=r}}),o.mapping&&e(t[o.group],o.mapping)})}(o,t),o},Rr=function(){return(arguments.length<=0?void 0:arguments[0])instanceof HTMLElement?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Te("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},t),o=gr("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);Object.keys(o).forEach(function(e){H(o[e])?(H(r[e])||(r[e]={}),Object.assign(r[e],o[e])):r[e]=o[e]}),r.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map(function(e){return{source:e.value,options:{type:e.dataset.type}}}));var i=vr(r);return e.files&&Array.from(e.files).forEach(function(e){i.addFile(e)}),i.replaceElement(e),i}.apply(void 0,arguments):vr.apply(void 0,arguments)},hr=["fire","_read","_write"],Or=function(e){var t={};return ae(e,t,hr),t},Dr=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,function(e,n){return t[n]})},yr=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var o=re();r.onmessage=function(e){e.data.id===o&&t(e.data.message)},r.postMessage({id:o,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},Sr=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})},Ar=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},br=function(e){return Ar(e,e.name)},Lr=[],Pr=function(e){if(!Lr.includes(e)){Lr.push(e);var t,n=e({addFilter:Ie,utils:{Type:de,forin:r,isString:G,isFile:tt,toNaturalFileSize:vt,replaceInString:Dr,getExtensionFromFilename:we,getFilenameWithoutExtension:et,guesstimateMimeType:hn,getFileFromBlob:Be,getFilenameFromURL:Ne,createRoute:S,createWorker:yr,createView:y,createItemAPI:se,loadImage:Sr,copyFile:br,renameFile:Ar,createBlob:Ve,applyFilterChain:_e,text:Et,getNumericAspectRatioFromString:Re},views:{fileActionButton:mt}});t=n.options,Object.assign(ve,t)}},Mr=(wt="undefined"!=typeof window&&void 0!==window.document&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window,function(){return wt}),Cr={apps:[]},Nr=function(){};if(e.Status={},e.FileStatus={},e.FileOrigin={},e.OptionTypes={},e.create=Nr,e.destroy=Nr,e.parse=Nr,e.find=Nr,e.registerPlugin=Nr,e.getOptions=Nr,e.setOptions=Nr,Mr()){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var o=window[r],i=1e3/n,a=null,u=null,s=null,l=null,c=function(){document.hidden?(s=function(){return window.setTimeout(function(){return f(performance.now())},i)},l=function(){return window.clearTimeout(u)}):(s=function(){return window.requestAnimationFrame(f)},l=function(){return window.cancelAnimationFrame(u)})};document.addEventListener("visibilitychange",function(){l&&l(),c(),f(performance.now())});var f=function e(t){u=s(e),a||(a=t);var n=t-a;n<=i||(a=t-n%i,o.readers.forEach(function(e){return e()}),o.writers.forEach(function(e){return e(t)}))};c(),f(performance.now())}(function(){Cr.apps.forEach(function(e){return e._read()})},function(e){Cr.apps.forEach(function(t){return t._write(e)})});var wr=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Mr,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout(function(){return wr()},0):document.addEventListener("DOMContentLoaded",wr);var Gr=function(){return r(me(),function(t,n){e.OptionTypes[t]=n[1]})};e.Status=Object.assign({},Oe),e.FileOrigin=Object.assign({},ce),e.FileStatus=Object.assign({},le),e.OptionTypes={},Gr(),e.create=function(){var t=Rr.apply(void 0,arguments);return t.on("destroy",e.destroy),Cr.apps.push(t),Or(t)},e.destroy=function(e){var t=Cr.apps.findIndex(function(t){return t.isAttachedTo(e)});return t>=0&&(Cr.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return Array.from(t.querySelectorAll(".filepond")).filter(function(e){return!Cr.apps.find(function(t){return t.isAttachedTo(e)})}).map(function(t){return e.create(t)})},e.find=function(e){var t=Cr.apps.find(function(t){return t.isAttachedTo(e)});return t?Or(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=new Array(e),n=0;n