/** 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([[14],{333:function(Ca,va,ba){ba.r(va);var pa=ba(2),ka=ba(0);ba.n(ka);var la=ba(1),fa=ba(116);Ca=ba(44);var ca=ba(70),z=ba(188),r=ba(52),n=ba(187);ba=ba(283);var b=window,a=function(){function x(w,h,y){var aa=-1===w.indexOf("?")?"?":"&";switch(h){case r.a.NEVER_CACHE:this.url=w+aa+"_="+Object(ka.uniqueId)();break;default:this.url=w}this.he=y;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With",
"XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=n.a.NOT_STARTED}x.prototype.start=function(w,h){var y=this,aa=this,ja=this.request,ha;aa.os=0;w&&Object.keys(w).forEach(function(ia){y.request.setRequestHeader(ia,w[ia])});h&&(this.request.withCredentials=h);this.my=setInterval(function(){var ia=0===window.document.URL.indexOf("file:///");ia=200===ja.status||
ia&&0===ja.status;if(ja.readyState!==n.b.DONE||ia){try{ja.responseText}catch(ea){return}aa.os<ja.responseText.length&&(ha=aa.U3())&&aa.trigger(x.Events.DATA,[ha]);0===ja.readyState&&(clearInterval(aa.my),aa.trigger(x.Events.DONE))}else clearInterval(aa.my),aa.trigger(x.Events.DONE,["Error received return status "+ja.status])},1E3);this.request.send(null);this.status=n.a.STARTED};x.prototype.U3=function(){var w=this.request,h=w.responseText;if(0!==h.length)if(this.os===h.length)clearInterval(this.my),
this.trigger(x.Events.DONE);else return h=Math.min(this.os+3E6,h.length),w=b.NK(w,this.os,!0,h),this.os=h,w};x.prototype.abort=function(){clearInterval(this.my);var w=this;this.request.onreadystatechange=function(){Object(la.i)("StreamingRequest aborted");w.status=n.a.ABORTED;return w.trigger(x.Events.ABORTED)};this.request.abort()};x.prototype.finish=function(){var w=this;this.request.onreadystatechange=function(){w.status=n.a.SUCCESS;return w.trigger(x.Events.DONE)};this.request.abort()};x.Events=
{DONE:"done",DATA:"data",ABORTED:"aborted"};return x}();Object(Ca.a)(a);var e;(function(x){x[x.LOCAL_HEADER=0]="LOCAL_HEADER";x[x.FILE=1]="FILE";x[x.CENTRAL_DIR=2]="CENTRAL_DIR"})(e||(e={}));var f=function(x){function w(){var h=x.call(this)||this;h.buffer="";h.state=e.LOCAL_HEADER;h.eF=4;h.qj=null;h.mp=fa.c;h.sk={};return h}Object(pa.c)(w,x);w.prototype.P3=function(h){var y;for(h=this.buffer+h;h.length>=this.mp;)switch(this.state){case e.LOCAL_HEADER:this.qj=y=this.Y3(h.slice(0,this.mp));if(y.Lp!==
fa.g)throw Error("Wrong signature in local header: "+y.Lp);h=h.slice(this.mp);this.state=e.FILE;this.mp=y.RA+y.Um+y.sr+this.eF;this.trigger(w.Events.HEADER,[y]);break;case e.FILE:this.qj.name=h.slice(0,this.qj.Um);this.sk[this.qj.name]=this.qj;y=this.mp-this.eF;var aa=h.slice(this.qj.Um+this.qj.sr,y);this.trigger(w.Events.FILE,[this.qj.name,aa,this.qj.eB]);h=h.slice(y);if(h.slice(0,this.eF)===fa.h)this.state=e.LOCAL_HEADER,this.mp=fa.c;else return this.state=e.CENTRAL_DIR,!0}this.buffer=h;return!1};
w.Events={HEADER:"header",FILE:"file"};return w}(z.a);Object(Ca.a)(f);Ca=function(x){function w(h,y,aa,ja,ha){aa=x.call(this,h,aa,ja)||this;aa.url=h;aa.stream=new a(h,y);aa.Wc=new f;aa.nN=window.createPromiseCapability();aa.NN={};aa.he=ha;return aa}Object(pa.c)(w,x);w.prototype.ct=function(h){var y=this;this.request([this.nh,this.si,this.mh]);this.stream.addEventListener(a.Events.DATA,function(aa){try{if(y.Wc.P3(aa))return y.stream.finish()}catch(ja){throw y.stream.abort(),y.qr(ja),h(ja),ja;}});this.stream.addEventListener(a.Events.DONE,
function(aa){y.w3=!0;y.nN.resolve();aa&&(y.qr(aa),h(aa))});this.Wc.addEventListener(f.Events.HEADER,Object(ka.bind)(this.MN,this));this.Wc.addEventListener(f.Events.FILE,Object(ka.bind)(this.o4,this));return this.stream.start(this.he,this.withCredentials)};w.prototype.LK=function(h){var y=this;this.nN.promise.then(function(){h(Object.keys(y.Wc.sk))})};w.prototype.Xk=function(){return!0};w.prototype.request=function(h){var y=this;this.w3&&h.forEach(function(aa){y.NN[aa]||y.c8(aa)})};w.prototype.MN=
function(){};w.prototype.abort=function(){this.stream&&this.stream.abort()};w.prototype.c8=function(h){this.trigger(ca.a.Events.PART_READY,[{Sa:h,error:"Requested part not found",Bg:!1,Ue:!1}])};w.prototype.o4=function(h,y,aa){this.NN[h]=!0;this.trigger(ca.a.Events.PART_READY,[{Sa:h,data:y,Bg:!1,Ue:!1,error:null,kc:aa}])};return w}(ca.a);Object(ba.a)(Ca);Object(ba.b)(Ca);va["default"]=Ca}}]);}).call(this || window)
