/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[6],{463:function(Ba,wa,r){r.r(wa);var oa=r(0);Ba=r(48);var na=r(177),ma=r(394),fa=r(223),ea=window;r=function(){function aa(w,x){this.mX=function(h){h=h.split(".");return h[h.length-1].match(/(jpg|jpeg|png|gif)$/i)};x=x||{};this.url=w;this.filename=x.filename||w;this.pf=x.customHeaders;this.vqa=!!x.useDownloader;this.withCredentials=!!x.withCredentials}aa.prototype.DF=function(w){this.pf=w};aa.prototype.getCustomHeaders=function(){return this.pf};
aa.prototype.getFileData=function(w){var x=this,h=this,e=new XMLHttpRequest,a=0===this.url.indexOf("blob:")?"blob":"arraybuffer";e.open("GET",this.url,!0);e.withCredentials=this.withCredentials;e.responseType=a;this.pf&&Object.keys(this.pf).forEach(function(f){e.setRequestHeader(f,x.pf[f])});var b=/^https?:/i.test(this.url);e.addEventListener("load",function(f){return Object(oa.b)(this,void 0,void 0,function(){var n,z,y,da,ia,ca;return Object(oa.d)(this,function(ba){switch(ba.label){case 0:if(200!==
this.status&&(b||0!==this.status))return[3,10];h.trigger(aa.Events.DOCUMENT_LOADING_PROGRESS,[f.loaded,f.loaded]);if("blob"!==this.responseType)return[3,4];n=this.response;return h.mX(h.filename)?[4,Object(fa.b)(n)]:[3,2];case 1:return z=ba.ca(),h.fileSize=z.byteLength,w(new Uint8Array(z)),[3,3];case 2:y=new FileReader,y.onload=function(ja){ja=new Uint8Array(ja.target.result);h.fileSize=ja.length;w(ja)},y.readAsArrayBuffer(n),ba.label=3;case 3:return[3,9];case 4:ba.fg.push([4,8,,9]);da=new Uint8Array(this.response);
if(!h.mX(h.filename))return[3,6];n=new Blob([da.buffer]);return[4,Object(fa.b)(n)];case 5:return z=ba.ca(),h.fileSize=z.byteLength,w(new Uint8Array(z)),[3,7];case 6:h.fileSize=da.length,w(da),ba.label=7;case 7:return[3,9];case 8:return ba.ca(),h.trigger(aa.Events.ERROR,["pdfLoad","Out of memory"]),[3,9];case 9:return[3,11];case 10:ia=f.currentTarget,ca=Object(na.b)(ia),h.trigger(aa.Events.ERROR,["pdfLoad",this.status+" "+ia.statusText,ca]),ba.label=11;case 11:return h.Qz=null,[2]}})})},!1);e.onprogress=
function(f){h.trigger(aa.Events.DOCUMENT_LOADING_PROGRESS,[f.loaded,0<f.total?f.total:0])};e.addEventListener("error",function(){h.trigger(aa.Events.ERROR,["pdfLoad","Network failure"]);h.Qz=null},!1);e.send();this.Qz=e};aa.prototype.getFile=function(){var w=this;return new Promise(function(x){ea.utils.isJSWorker&&x(w.url);if(w.vqa){var h=Object(oa.a)({url:w.url},w.pf?{customHeaders:w.pf}:{});x(h)}x(null)})};aa.prototype.abort=function(){this.Qz&&(this.Qz.abort(),this.Qz=null)};aa.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress",
ERROR:"error"};return aa}();Object(Ba.a)(r);Object(ma.a)(r);Object(ma.b)(r);wa["default"]=r}}]);}).call(this || window)
