| 1 |
- import{D as r}from"./entry/index-BNACB_--.js";import{d as c,u as l}from"./base64Conver-DEMZeTZS.js";function m(e,t,n,s){l(e).then(a=>{f(a,t,n)})}function f(e,t,n,s){const a=c(e);w(a,t,n)}function w(e,t,n,s){const a=[e],d=new Blob(a,{type:n||"application/octet-stream"}),i=window.URL.createObjectURL(d),o=document.createElement("a");o.style.display="none",o.href=i,o.setAttribute("download",t),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(i)}function p({url:e,target:t="_blank",fileName:n}){const s=window.navigator.userAgent.toLowerCase().indexOf("chrome")>-1,a=window.navigator.userAgent.toLowerCase().indexOf("safari")>-1;if(/(iP)/g.test(window.navigator.userAgent))return!1;if(s||a){const d=document.createElement("a");if(d.href=e,d.target=t,d.download!==void 0&&(d.download=n||e.substring(e.lastIndexOf("/")+1,e.length)),document.createEvent){const i=document.createEvent("MouseEvents");return i.initEvent("click",!0,!0),d.dispatchEvent(i),!0}}return e.indexOf("?")===-1&&(e+="?download"),r(e,{target:t}),!0}export{p as a,w as b,m as c,f as d};
|