src/pyams_skin/resources/js/ext/js-filesaver.min.js
changeset 557 bca7a7e058a3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_skin/resources/js/ext/js-filesaver.min.js	Thu Feb 13 11:43:31 2020 +0100
@@ -0,0 +1,1 @@
+!function(e,t){if("function"==typeof define&&define.amd)define([],t);else if("undefined"!=typeof exports)t();else{t(),e.FileSaver={}}}(this,function(){"use strict";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;function d(e,t,o){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){a(n.response,t,o)},n.onerror=function(){console.error("could not download file")},n.send()}function r(e){var t=new XMLHttpRequest;return t.open("HEAD",e,!1),t.send(),200<=t.status&&t.status<=299}function l(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(o)}}var a=f.saveAs||"object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,o){var n=f.URL||f.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener","string"==typeof e?(a.href=e,a.origin!==location.origin?r(a.href)?d(e,t,o):l(a,a.target="_blank"):l(a)):(a.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(a.href)},4e4),setTimeout(function(){l(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,o){if(t=t||e.name||"download","string"==typeof e)if(r(e))d(e,t,o);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){l(n)})}else navigator.msSaveOrOpenBlob((a=e,void 0===(i=o)?i={autoBom:!1}:"object"!=typeof i&&(console.warn("Depricated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a),t);var a,i}:function(e,t,o,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof e)return d(e,t,o);var a="application/octet-stream"===e.type,i=/constructor/i.test(f.HTMLElement)||f.safari,r=/CriOS\/[\d]+/.test(navigator.userAgent);if((r||a&&i)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=r?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=e:location=e,n=null},l.readAsDataURL(e)}else{var c=f.URL||f.webkitURL,s=c.createObjectURL(e);n?n.location=s:location.href=s,n=null,setTimeout(function(){c.revokeObjectURL(s)},4e4)}};f.saveAs=a.saveAs=a,"undefined"!=typeof module&&(module.exports=a)});