function mockNetwork(a){if(!global.__minium__["".concat(a,"_network_mocked")]){Object.defineProperty(global.__minium__,"".concat(a,"_network_mocked"),{value:!0,writable:!1});var b=function(){"use strict";function a(b,c,d){var e=this;global.babelHelpers.classCallCheck(this,a),this.success=b,this.fail=c,this.callback=d,this.chunkCallback=[],this.headersReceivedCallback=[],this.progressUpdateCallback=[],this.fd=setTimeout(function(){e.headersReceivedCallback.forEach(function(a){e.success&&a({header:e.success.header})}),e.chunkCallback.forEach(function(a){e.success&&a(e.success.data)}),e.progressUpdateCallback.forEach(function(a){e.success&&a({progress:100,totalBytesWritten:100,totalBytesExpectedToWrite:100})}),d(e.success||e.fail)})}return global.babelHelpers.createClass(a,[{key:"abort",value:function abort(){clearTimeout(this.fd)}},{key:"offChunkReceived",value:function offChunkReceived(a){var b=this.chunkCallback.indexOf(a);-1!==b&&this.chunkCallback.splice(b,1)}},{key:"offHeadersReceived",value:function offHeadersReceived(a){var b=this.headersReceivedCallback.indexOf(a);-1!==b&&this.headersReceivedCallback.splice(b,1)}},{key:"onChunkReceived",value:function onChunkReceived(a){this.chunkCallback.push(a)}},{key:"onHeadersReceived",value:function onHeadersReceived(a){this.headersReceivedCallback.push(a)}},{key:"onProgressUpdate",value:function onProgressUpdate(a){this.progressUpdateCallback.push(a)}}]),a}();global.__minium__["".concat(a,"Task")]=b;var c=new global.__minium__.MockRule("".concat(a,"_network_mock_rule"));global.__minium__.setMock(a,function(a){var d=c.search(a);return d?(console.log("@@@@rule match",d),a.__miniumMocked=!0,d.success)?new b(d.success,void 0,function(b){a.success&&a.success(b),a.complete&&a.complete(b)}):d.fail?new b(void 0,d.fail,function(b){a.fail&&a.fail(b),a.complete&&a.complete(b)}):void 0:this.origin(a)})}}