!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=15)}({15:function(e,t,n){"use strict";n.r(t),n.d(t,"getExtName",(function(){return i})),n.d(t,"download",(function(){return u})),n.d(t,"downloadBlob",(function(){return d})),n.d(t,"getFileType",(function(){return f})),n.d(t,"isImage",(function(){return l})),n.d(t,"isVideo",(function(){return a})),n.d(t,"isAudio",(function(){return p})),n.d(t,"isPDF",(function(){return s})),n.d(t,"FileType",(function(){return r}));var r={IMAGE:"IMAGE",VIDEO:"VIDEO",AUDIO:"AUDIO",PDF:"PDF",OTHER:"OTHER"},o=[{type:r.IMAGE,extList:[".png",".jpg",".jpeg",".bmp",".gif",".webp",".svg"]},{type:r.VIDEO,extList:[".flv",".avi",".mp4",".ogg"]},{type:r.AUDIO,extList:[".mp3",".m4a",".wav",".mpeg"]},{type:r.PDF,extList:[".pdf"]}],i=function(e,t){if(void 0===t&&(t=!0),!e)return"";var n=/^.+(\.(\w+))$/g.exec(e)||[],r=n[1],o=void 0===r?"":r,i=n[2];return t?o:void 0===i?"":i},u=function(e,t,n){var r=document.createElement("a");r.style.display="none",r.href=e,t&&r.setAttribute("download",decodeURI(t)),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r)},d=function(e,t,n){var r=new Blob([e],{type:n}),o=window.URL.createObjectURL(r);u(o,t),window.URL.revokeObjectURL(o)},f=function(e){var t=i(e),n=o.find((function(e){return e.extList.includes(t)}));return n?n.type:r.OTHER},c=function(e){return function(t){var n=f(t);return e===n}},l=c(r.IMAGE),a=c(r.VIDEO),p=c(r.AUDIO),s=c(r.PDF)}})}));
//# sourceMappingURL=file.js.map