/** 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([[12],{465:function(Ba,wa,r){r.r(wa);var oa=r(0),na=r(1);r.n(na);var ma=r(2),fa=r(157);Ba=r(48);var ea=r(100),aa=r(262),w=r(74),x=r(261);r=r(394);var h=window,e=function(){function f(n,z,y){var da=-1===n.indexOf("?")?"?":"&";switch(z){case w.a.NEVER_CACHE:this.url=n+da+"_="+Object(na.uniqueId)();break;default:this.url=n}this.pf=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=x.a.NOT_STARTED}f.prototype.start=function(n,z){var y=this,da=this,ia=this.request,ca;da.Vx=0;n&&Object.keys(n).forEach(function(ba){y.request.setRequestHeader(ba,n[ba])});z&&(this.request.withCredentials=z);this.cF=setInterval(function(){var ba=0===window.document.URL.indexOf("file:///");ba=200===ia.status||
ba&&0===ia.status;if(ia.readyState!==x.b.DONE||ba){try{ia.responseText}catch(ja){return}da.Vx<ia.responseText.length&&(ca=da.vka())&&da.trigger(f.Events.DATA,[ca]);0===ia.readyState&&(clearInterval(da.cF),da.trigger(f.Events.DONE))}else clearInterval(da.cF),da.trigger(f.Events.DONE,["Error received return status "+ia.status])},1E3);this.request.send(null);this.status=x.a.STARTED};f.prototype.vka=function(){var n=this.request,z=n.responseText;if(0!==z.length)if(this.Vx===z.length)clearInterval(this.cF),
this.trigger(f.Events.DONE);else return z=Math.min(this.Vx+3E6,z.length),n=h.ZV(n,this.Vx,!0,z),this.Vx=z,n};f.prototype.abort=function(){clearInterval(this.cF);var n=this;this.request.onreadystatechange=function(){Object(ma.j)("StreamingRequest aborted");n.status=x.a.ABORTED;return n.trigger(f.Events.ABORTED)};this.request.abort()};f.prototype.finish=function(){var n=this;this.request.onreadystatechange=function(){n.status=x.a.SUCCESS;return n.trigger(f.Events.DONE)};this.request.abort()};f.Events=
{DONE:"done",DATA:"data",ABORTED:"aborted"};return f}();Object(Ba.a)(e);var a;(function(f){f[f.LOCAL_HEADER=0]="LOCAL_HEADER";f[f.FILE=1]="FILE";f[f.CENTRAL_DIR=2]="CENTRAL_DIR"})(a||(a={}));var b=function(f){function n(){var z=f.call(this)||this;z.buffer="";z.state=a.LOCAL_HEADER;z.pO=4;z.Cm=null;z.au=fa.c;z.ao={};return z}Object(oa.c)(n,f);n.prototype.oka=function(z){var y;for(z=this.buffer+z;z.length>=this.au;)switch(this.state){case a.LOCAL_HEADER:this.Cm=y=this.zka(z.slice(0,this.au));if(y.Iu!==
fa.g)throw Error("Wrong signature in local header: "+y.Iu);z=z.slice(this.au);this.state=a.FILE;this.au=y.CI+y.Tq+y.Ow+this.pO;this.trigger(n.Events.HEADER,[y]);break;case a.FILE:this.Cm.name=z.slice(0,this.Cm.Tq);this.ao[this.Cm.name]=this.Cm;y=this.au-this.pO;var da=z.slice(this.Cm.Tq+this.Cm.Ow,y);this.trigger(n.Events.FILE,[this.Cm.name,da,this.Cm.UI]);z=z.slice(y);if(z.slice(0,this.pO)===fa.h)this.state=a.LOCAL_HEADER,this.au=fa.c;else return this.state=a.CENTRAL_DIR,!0}this.buffer=z;return!1};
n.Events={HEADER:"header",FILE:"file"};return n}(aa.a);Object(Ba.a)(b);Ba=function(f){function n(z,y,da,ia,ca){da=f.call(this,z,da,ia)||this;da.url=z;da.stream=new e(z,y);da.Cd=new b;da.hZ=window.createPromiseCapability();da.IZ={};da.pf=ca;return da}Object(oa.c)(n,f);n.prototype.Qy=function(z){var y=this;this.request([this.Gj,this.jl,this.Fj]);this.stream.addEventListener(e.Events.DATA,function(da){try{if(y.Cd.oka(da))return y.stream.finish()}catch(ia){throw y.stream.abort(),y.nq(ia),z(ia),ia;}});
this.stream.addEventListener(e.Events.DONE,function(da){y.Rja=!0;y.hZ.resolve();da&&(y.nq(da),z(da))});this.Cd.addEventListener(b.Events.HEADER,Object(na.bind)(this.HZ,this));this.Cd.addEventListener(b.Events.FILE,Object(na.bind)(this.Pka,this));return this.stream.start(this.pf,this.withCredentials)};n.prototype.WV=function(z){var y=this;this.hZ.promise.then(function(){z(Object.keys(y.Cd.ao))})};n.prototype.No=function(){return!0};n.prototype.request=function(z){var y=this;this.Rja&&z.forEach(function(da){y.IZ[da]||
y.Wpa(da)})};n.prototype.HZ=function(){};n.prototype.abort=function(){this.stream&&this.stream.abort()};n.prototype.Wpa=function(z){this.trigger(ea.a.Events.PART_READY,[{fb:z,error:"Requested part not found",Qi:!1,qg:!1}])};n.prototype.Pka=function(z,y,da){this.IZ[z]=!0;this.trigger(ea.a.Events.PART_READY,[{fb:z,data:y,Qi:!1,qg:!1,error:null,fd:da}])};return n}(ea.a);Object(r.a)(Ba);Object(r.b)(Ba);wa["default"]=Ba}}]);}).call(this || window)
