6 lines
2.1 KiB
JavaScript
6 lines
2.1 KiB
JavaScript
/** 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([[10],{436:function(ia,ba,e){e.r(ba);var ea=e(1),x=e(2),ha=e(147);ia=e(94);var ca=e(246);e=e(376);var da=window;ia=function(e){function w(w,n,h){n=e.call(this,w,n,h)||this;if(w.name&&"xod"!==w.name.toLowerCase().split(".").pop())throw Error("Not an XOD file");if(!da.FileReader||!da.File||!da.Blob)throw Error("File API is not supported in this browser");n.file=w;n.hB=[];n.KH=0;return n}Object(ea.c)(w,e);w.prototype.xK=function(e,n,
|
|
h){var f=this,r=new FileReader;r.onloadend=function(e){if(0<f.hB.length){var w=f.hB.shift();w.aha.readAsBinaryString(w.file)}else f.KH--;if(r.error){e=r.error;if(e.code===e.ABORT_ERR){Object(x.j)("Request for chunk "+n.start+"-"+n.stop+" was aborted");return}return h(e)}if(e=r.content||e.target.result)return h(!1,e);Object(x.j)("No data was returned from FileReader.")};n&&(e=(e.slice||e.webkitSlice||e.mozSlice||e.Eoa).call(e,n.start,n.stop));0===f.hB.length&&50>f.KH?(r.readAsBinaryString(e),f.KH++):
|
|
f.hB.push({aha:r,file:e});return function(){r.abort()}};w.prototype.ot=function(e){var n=this;n.dB=!0;var h=ha.a;n.xK(n.file,{start:-h,stop:n.file.size},function(f,r){if(f)return Object(x.j)("Error loading end header: %s "+f),e(f);if(r.length!==h)throw Error("Zip end header data is wrong size!");n.de=new ca.a(r);var w=n.de.lT();n.xK(n.file,w,function(f,h){if(f)return Object(x.j)("Error loading central directory: %s "+f),e(f);if(h.length!==w.stop-w.start)throw Error("Zip central directory data is wrong size!");
|
|
n.de.iX(h);n.vH=!0;n.dB=!1;return e(!1)})})};w.prototype.uL=function(e,n){var h=this,f=h.bi[e];if(h.de.zR(e)){var r=h.de.zw(e),w=h.xK(h.file,r,function(f,w){delete h.bi[e];if(f)return Object(x.j)('Error loading part "%s": %s, '+e+", "+f),n(f);if(w.length!==r.stop-r.start)throw Error("Part data is wrong size!");n(!1,e,w,h.de.PU(e))});f.vZ=!0;f.cancel=w}else n(Error('File not found: "'+e+'"'),e)};return w}(ia.a);Object(e.a)(ia);Object(e.b)(ia);ba["default"]=ia}}]);}).call(this || window)
|