"use strict";!function(e,t){var o="function"==typeof define,i="undefined"!=typeof module&&module.exports;if(o)define(t);else if(i)module.exports=t();else if("undefined"!=typeof window)window[e]=t();else try{this[e]=t()}catch(e){throw e}}("JsFileSaver",function(){function i(e){var t=e.action,o=e.method,i=e.contentType,n=e.payload,d=document.createElement("form");for(var a in d.setAttribute("action",t),d.setAttribute("method",o||"post"),d.setAttribute("enctype",i||"application/x-www-form-urlencoded"),n)if(n[a]){var r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",a),r.setAttribute("value",n[a]),d.appendChild(r)}document.body.appendChild(d),d.submit(),document.body.removeChild(d)}function t(e,t,o){try{new Blob,Promise.resolve();!function(e,t,o){var i=void 0!==o?[o,e.data]:[e.data],n=new Blob(i,{type:t||"application/octet-stream"}),d=void 0;try{d=e.headers["content-disposition"]?e.headers["content-disposition"].split(";")[1].split("filename=")[1].replace(/"/g,""):e.headers["Content-Disposition"].split(";")[1].split("filename=")[1].replace(/"/g,""),d=decodeURIComponent(d)}catch(e){d="download"}if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(n,d);else{var a=window.URL.createObjectURL(n),r=document.createElement("a");r.href=a,r.setAttribute("download",d),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(a)}}(e,t,o)}catch(e){this.options.action&&i(this.options)}}return function(e){this.options=e,this.saver=t,this.saverCompatible=function(){return i(e)}}});