/** 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([[8],{440:function(Ba,ua,r){r.r(ua);var pa=r(1);Ba=r(51);var ka=r(163),ma=r(375),fa=r(229),da=window;r=function(){function z(x,y){this.GU=function(f){f=f.split(".");return f[f.length-1].match(/(jpg|jpeg|png|gif)$/i)};y=y||{};this.url=x;this.filename=y.filename||x;this.af=y.customHeaders;this.Jla=!!y.useDownloader;this.withCredentials=!!y.withCredentials}z.prototype.rE=function(x){this.af=x};z.prototype.getCustomHeaders=function(){return this.af};
z.prototype.getFileData=function(x){var y=this,f=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.af&&Object.keys(this.af).forEach(function(h){e.setRequestHeader(h,y.af[h])});var b=/^https?:/i.test(this.url);e.addEventListener("load",function(h){return Object(pa.b)(this,void 0,void 0,function(){var n,ba,w,ea,ja,aa;return Object(pa.d)(this,function(ca){switch(ca.label){case 0:if(200!==
this.status&&(b||0!==this.status))return[3,10];f.trigger(z.Events.DOCUMENT_LOADING_PROGRESS,[h.loaded,h.loaded]);if("blob"!==this.responseType)return[3,4];n=this.response;return f.GU(f.filename)?[4,Object(fa.b)(n)]:[3,2];case 1:return ba=ca.ea(),f.fileSize=ba.byteLength,x(new Uint8Array(ba)),[3,3];case 2:w=new FileReader,w.onload=function(ia){ia=new Uint8Array(ia.target.result);f.fileSize=ia.length;x(ia)},w.readAsArrayBuffer(n),ca.label=3;case 3:return[3,9];case 4:ca.vg.push([4,8,,9]);ea=new Uint8Array(this.response);
if(!f.GU(f.filename))return[3,6];n=new Blob([ea.buffer]);return[4,Object(fa.b)(n)];case 5:return ba=ca.ea(),f.fileSize=ba.byteLength,x(new Uint8Array(ba)),[3,7];case 6:f.fileSize=ea.length,x(ea),ca.label=7;case 7:return[3,9];case 8:return ca.ea(),f.trigger(z.Events.ERROR,["pdfLoad","Out of memory"]),[3,9];case 9:return[3,11];case 10:ja=h.currentTarget,aa=Object(ka.b)(ja),f.trigger(z.Events.ERROR,["pdfLoad",this.status+" "+ja.statusText,aa]),ca.label=11;case 11:return f.Ty=null,[2]}})})},!1);e.onprogress=
function(h){f.trigger(z.Events.DOCUMENT_LOADING_PROGRESS,[h.loaded,0<h.total?h.total:0])};e.addEventListener("error",function(){f.trigger(z.Events.ERROR,["pdfLoad","Network failure"]);f.Ty=null},!1);e.send();this.Ty=e};z.prototype.getFile=function(){var x=this;return new Promise(function(y){da.utils.isJSWorker&&y(x.url);if(x.Jla){var f=Object(pa.a)({url:x.url},x.af?{customHeaders:x.af}:{});y(f)}y(null)})};z.prototype.abort=function(){this.Ty&&(this.Ty.abort(),this.Ty=null)};z.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress",
ERROR:"error"};return z}();Object(Ba.a)(r);Object(ma.a)(r);Object(ma.b)(r);ua["default"]=r}}]);}).call(this || window)
