UNPKG

@suns/react-monorepo-nx

Version:

To evaluate and compare the bundled and unbundled builds on large codebase.

5 lines (4 loc) 1.62 kB
/** 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],{520:function(wa,ta,n){n.r(ta);var pa=n(0);wa=n(51);var oa=n(438),na=n(247),ja=n(24),ka=window;n=function(){function fa(y){var x=this;this.Xqa=function(f){return f&&("image"===f.type.split("/")[0].toLowerCase()||f.name&&!!f.name.match(/.(jpg|jpeg|png|gif)$/i))};this.file=y;this.lra=new Promise(function(f){return Object(pa.b)(x,void 0,void 0,function(){var e;return Object(pa.d)(this,function(a){switch(a.label){case 0:return this.Xqa(this.file)? [4,Object(na.b)(y)]:[3,2];case 1:e=a.ba(),this.file=ja.q?new Blob([e],{type:y.type}):new File([e],null===y||void 0===y?void 0:y.name,{type:y.type}),a.label=2;case 2:return f(!0),[2]}})})})}fa.prototype.getFileData=function(y){var x=this,f=new FileReader;f.onload=function(e){x.trigger(fa.Events.DOCUMENT_LOADING_PROGRESS,[e.loaded,e.loaded]);y(new Uint8Array(e.target.result))};f.onprogress=function(e){e.lengthComputable&&x.trigger(fa.Events.DOCUMENT_LOADING_PROGRESS,[e.loaded,0<e.total?e.total:0])}; f.readAsArrayBuffer(this.file)};fa.prototype.getFile=function(){return Object(pa.b)(this,void 0,Promise,function(){return Object(pa.d)(this,function(y){switch(y.label){case 0:return[4,this.lra];case 1:return y.ba(),ka.da.isJSWorker?[2,this.file.path]:[2,this.file]}})})};fa.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress"};return fa}();Object(wa.a)(n);Object(oa.a)(n);Object(oa.b)(n);ta["default"]=n}}]);}).call(this || window)