(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.filesaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autobom:!1}:"object"!=typeof b&&(console.warn("deprecated: expected third argument to be a object"),b={autobom:!b}),b.autobom&&/^\s*(?:text\/\s*|application\/xml|\s*\/\s*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new blob(["\ufeff",a],{type:a.type}):a}function c(a,b,c){var d=new xmlhttprequest;d.open("get",a),d.responsetype="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new xmlhttprequest;b.open("head",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchevent(new mouseevent("click"))}catch(c){var b=document.createevent("mouseevents");b.initmouseevent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchevent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/macintosh/.test(navigator.useragent)&&/applewebkit/.test(navigator.useragent)&&!/safari/.test(navigator.useragent),g=f.saveas||("object"!=typeof window||window!==f?function(){}:"download"in htmlanchorelement.prototype&&!a?function(b,g,h){var i=f.url||f.webkiturl,j=document.createelement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createobjecturl(b),settimeout(function(){i.revokeobjecturl(j.href)},4e4),settimeout(function(){e(j)},0))}:"mssaveoropenblob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.mssaveoropenblob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createelement("a");i.href=f,i.target="_blank",settimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innertext="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.htmlelement)||f.safari,j=/crios\/[\d]+/.test(navigator.useragent);if((j||h&&i||a)&&"undefined"!=typeof filereader){var k=new filereader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readasdataurl(b)}else{var l=f.url||f.webkiturl,m=l.createobjecturl(b);g?g.location=m:location.href=m,g=null,settimeout(function(){l.revokeobjecturl(m)},4e4)}});f.saveas=g.saveas=g,"undefined"!=typeof module&&(module.exports=g)}); //# sourcemappingurl=filesaver.min.js.map