/** 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([[0],{372:function(Ba,ya,z){z.r(ya);z.d(ya,"ByteRangeRequest",function(){return ca});var qa=z(1),ka=z(0);z.n(ka);var la=z(2),ha=z(129);Ba=z(83);var da=z(217),y=z(65),r=z(61),h=z(216),a=z(144);z=z(339);var b=[],e=[],f=window,n=function(){return function(){this.hl=1}}(),x;(function(aa){aa[aa.UNSENT=0]="UNSENT";aa[aa.DONE=4]="DONE"})(x||(x={}));var ca=function(){function aa(ja,fa,ea,ba){var ma=this;this.url=ja;this.range=fa;this.Me=ea;
this.withCredentials=ba;this.iY=x;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);f.Uint8Array&&(this.request.responseType="arraybuffer");ba&&(this.request.withCredentials=ba);w.DISABLE_RANGE_HEADER||(Object(ka.isUndefined)(fa.stop)?this.request.setRequestHeader("Range","bytes="+fa.start):this.request.setRequestHeader("Range",["bytes=",fa.start,"-",fa.stop-1].join("")));this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");ea&&Object.keys(ea).forEach(function(ta){ma.request.setRequestHeader(ta,
ea[ta])});this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=h.a.NOT_STARTED}aa.prototype.start=function(ja){var fa=this,ea=this.request;ea.onreadystatechange=function(){if(fa.aborted)return fa.status=h.a.ABORTED,ja({code:h.a.ABORTED});if(this.readyState===fa.iY.DONE){fa.gA();var ba=0===window.document.URL.indexOf("file:///");200===ea.status||206===ea.status||ba&&0===ea.status?
(ba=f.aQ(this),fa.JJ(ba,ja)):(fa.status=h.a.ERROR,ja({code:fa.status,status:fa.status}))}};this.request.send(null);this.status=h.a.STARTED};aa.prototype.JJ=function(ja,fa){this.status=h.a.SUCCESS;if(fa)return fa(!1,ja)};aa.prototype.abort=function(){this.gA();this.aborted=!0;this.request.abort()};aa.prototype.gA=function(){var ja=Object(a.c)(this.url,this.range,e);-1!==ja&&e.splice(ja,1);if(0<b.length){ja=b.shift();var fa=new aa(ja.url,ja.range,this.Me,this.withCredentials);ja.request=fa;e.push(ja);
fa.start(Object(a.d)(ja))}};aa.prototype.extend=function(ja){var fa=Object.assign({},this,ja.prototype);fa.constructor=ja;return fa};return aa}(),w=function(aa){function ja(fa,ea,ba,ma,ta){ba=aa.call(this,fa,ba,ma)||this;ba.jl={};ba.Gy=ea;ba.url=fa;ba.DISABLE_RANGE_HEADER=!1;ba.Lv=ca;ba.AK=3;ba.Me=ta||{};return ba}Object(qa.c)(ja,aa);ja.prototype.Tt=function(fa,ea,ba){var ma=-1===fa.indexOf("?")?"?":"&";switch(ba){case !1:case r.a.NEVER_CACHE:fa=fa+ma+"_="+Object(ka.uniqueId)();break;case !0:case r.a.CACHE:fa=
fa+ma+"_="+ea.start+","+(Object(ka.isUndefined)(ea.stop)?"":ea.stop)}return fa};ja.prototype.qO=function(fa,ea,ba,ma){void 0===ba&&(ba={});return new this.Lv(fa,ea,ba,ma)};ja.prototype.e4=function(fa,ea,ba,ma,ta){for(var na=0;na<b.length;na++)if(Object(ka.isEqual)(b[na].range,ea)&&Object(ka.isEqual)(b[na].url,fa))return b[na].lg.push(ma),b[na].eB++,null;for(na=0;na<e.length;na++)if(Object(ka.isEqual)(e[na].range,ea)&&Object(ka.isEqual)(e[na].url,fa))return e[na].lg.push(ma),e[na].eB++,null;ba={url:fa,
range:ea,Gy:ba,lg:[ma],eB:1};if(0===b.length&&e.length<this.AK)return e.push(ba),ba.request=this.qO(fa,ea,ta,this.withCredentials),ba;b.push(ba);return null};ja.prototype.Gm=function(fa,ea,ba){var ma=this.Tt(fa,ea,this.Gy);(fa=this.e4(ma,ea,this.Gy,ba,this.Me))&&fa.request.start(Object(a.d)(fa));return function(){var ta=Object(a.c)(ma,ea,e);if(-1!==ta){var na=--e[ta].eB;0===na&&e[ta].request&&e[ta].request.abort()}else ta=Object(a.c)(ma,ea,b),-1!==ta&&(na=--b[ta].eB,0===na&&b.splice(ta,1))}};ja.prototype.HP=
function(){return{start:-ha.a}};ja.prototype.b7=function(){var fa=-(ha.a+ha.e);return{start:fa-ha.d,end:fa}};ja.prototype.yr=function(fa){var ea=this;this.My=!0;var ba=ha.a;this.Gm(this.url,this.HP(),function(ma,ta,na){function oa(){var pa=ea.Gd.EP();ea.Gm(ea.url,pa,function(ua,va){if(ua)return Object(la.i)("Error loading central directory: "+ua),fa(ua);va=Object(y.a)(va);if(va.length!==pa.stop-pa.start)return fa("Invalid XOD file: Zip central directory data is wrong size! Should be "+(pa.stop-pa.start)+
" but is "+va.length);ea.Gd.WS(va);ea.GE=!0;ea.My=!1;return fa(!1)})}if(ma)return Object(la.i)("Error loading end header: "+ma),fa(ma,ta,na);ta=Object(y.a)(ta);if(ta.length!==ba)return fa("Invalid XOD file: Zip end header data is wrong size!");try{ea.Gd=new da.a(ta)}catch(pa){return fa(pa)}ea.Gd.x8?ea.Gm(ea.url,ea.b7(),function(pa,ua){if(pa)return Object(la.i)("Error loading zip64 header: "+pa),fa(pa);ua=Object(y.a)(ua);ea.Gd.P8(ua);oa()}):oa()})};ja.prototype.YP=function(fa){fa(Object.keys(this.Gd.gm))};
ja.prototype.rI=function(fa,ea){var ba=this;if(this.Gd.jO(fa)){var ma=this.Gd.Xz(fa);if(ma in this.jl){var ta=this.lh[fa];ta.vq=this.jl[ma];ta.vq.hl++;ta.cancel=ta.vq.cancel}else{var na=this.Gd.B5(fa),oa=this.Gm(this.url,na,function(ua,va){ua?(Object(la.i)('Error loading part "'+fa+'": '+ua),ba.Gm(ba.url,na,function(ra,xa){if(ra)return ea(ra,fa);ba.$S(xa,na,ma,fa,ea)})):ba.$S(va,na,ma,fa,ea)}),pa=this.lh[fa];pa&&(pa.dV=!0,pa.cancel=function(){pa.vq.hl--;0===pa.vq.hl&&(oa(),delete ba.jl[ma])},this.jl[ma]=
new n(ma),pa.vq=this.jl[ma],pa.vq.cancel=pa.cancel)}}else delete this.lh[fa],ea(Error('File not found: "'+fa+'"'),fa)};ja.prototype.$S=function(fa,ea,ba,ma,ta){if(fa.length!==ea.stop-ea.start)ta(Error("Part data is wrong size!"),ma);else{do{if(!this.jl[ba])return;ma=this.jl[ba].hl;for(var na=ea.mp.length,oa=0;oa<na;++oa){var pa=ea.mp[oa];ta(!1,pa.ip,fa["string"===typeof fa?"substring":"subarray"](pa.start,pa.stop),this.Gd.UQ(pa.ip));pa.ip in this.lh&&delete this.lh[pa.ip]}}while(ma!==this.jl[ba].hl);
delete this.jl[ba]}};ja.DISABLE_RANGE_HEADER=!1;ja.AK=3;return ja}(Ba.a);(function(aa){function ja(fa,ea,ba){var ma=aa.call(this)||this,ta;for(ta in fa)ma[ta]=fa[ta];ma.iia=fa;ma.startOffset=ea;ma.endOffset=ba;ma.qO=function(na,oa,pa,ua){Object(ka.isUndefined)(oa.stop)?(oa.start+=ma.endOffset,oa.stop=ma.endOffset):(oa.start+=ma.startOffset,oa.stop+=ma.startOffset);na=ma.Tt(ma.url,oa,ma.Gy);return new fa.Lv(na,oa,pa,ua)};return ma}Object(qa.c)(ja,aa);return ja})(w);Object(z.a)(w);Object(z.b)(w);ya["default"]=
w}}]);}).call(this || window)
