summaryrefslogtreecommitdiffhomepage
path: root/docs/assets/modules/file-saver-igGfcqei.js
blob: 1592c18eeb9da0e67f5642a0f6f6a931f9d6e886 (plain) (blame)
1
function O(n,l){for(var i=0;i<l.length;i++){const r=l[i];if(typeof r!="string"&&!Array.isArray(r)){for(const c in r)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(r,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>r[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function A(n){if(n.__esModule)return n;var l=n.default;if(typeof l=="function"){var i=function r(){return this instanceof r?Reflect.construct(l,arguments,this.constructor):l.apply(this,arguments)};i.prototype=l.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var c=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,c.get?c:{enumerable:!0,get:function(){return n[r]}})}),i}var h={exports:{}};(function(n,l){(function(i,r){r()})(p,function(){function i(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,u){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){v(o.response,t,u)},o.onerror=function(){console.error("could not download file")},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function f(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof p=="object"&&p.global===p?p:void 0,w=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),v=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!w?function(e,t,u){var o=s.URL||s.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener",typeof e=="string"?(a.href=e,a.origin===location.origin?f(a):c(a.href)?r(e,t,u):f(a,a.target="_blank")):(a.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(a.href)},4e4),setTimeout(function(){f(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,u){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(i(e,u),t);else if(c(e))r(e,t,u);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){f(o)})}}:function(e,t,u,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,u);var a=e.type==="application/octet-stream",j=/constructor/i.test(s.HTMLElement)||s.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||a&&j||w)&&typeof FileReader<"u"){var y=new FileReader;y.onloadend=function(){var d=y.result;d=b?d:d.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=d:location=d,o=null},y.readAsDataURL(e)}else{var g=s.URL||s.webkitURL,m=g.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout(function(){g.revokeObjectURL(m)},4e4)}});s.saveAs=v.saveAs=v,n.exports=v})})(h);var E=h.exports;const R=O({__proto__:null},[E]);export{R as F,_ as a,p as c,A as g};