1 line
66 KiB
JSON
1 line
66 KiB
JSON
|
{"id":"LM4G","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"./webdetector.plugins","loc":{"line":45,"column":35},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/index.ts","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/webdetector.plugins.ts"},{"name":"rxjs/operators","loc":{"line":46,"column":26},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/ts/index.ts","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/operators/index.js"}],"generated":{"js":"\"use strict\";var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function a(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},e=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};exports.__esModule=!0;var r=n(require(\"./webdetector.plugins\")),i=require(\"rxjs/operators\"),o=function(){function n(t){this.onlineObservableIntake=new r.smartrx.ObservableIntake,this.onlineObservable=this.onlineObservableIntake.observable.pipe(i.throttleTime(1e4)),this.latestState=\"online\",this.options=t}return n.prototype.isOnline=function(){return t(this,void 0,void 0,function(){var n,r,i,o,s=this;return e(this,function(a){switch(a.label){case 0:return n=!1,r=new AbortController,i=fetch(this.options.checkOnlineUrl,{signal:r.signal}),setTimeout(function(){r.abort()},1e3),[4,i.then(function(r){return t(s,void 0,void 0,function(){return e(this,function(t){return n=!0,[2]})})}).catch(function(t){})];case 1:return a.sent(),(o=n?\"online\":\"offline\")!==this.latestState&&this.onlineObservableIntake.push(this.latestState),this.latestState=o,[2,n]}})})},n.prototype.startPeriodicChecks=function(){return t(this,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:return[4,this.isOnline()];case 1:return t.sent(),[4,r.smartdelay.delayFor(3e3)];case 2:return t.sent(),[3,0];case 3:return[2]}})})},n}();exports.WebDetector=o;","map":{"mappings":[{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":0}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":13}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":17}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":19}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":25}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},"generated":{"line":1,"column":30}},{"source":"../ts/index.ts","name":null,"original":{"line":9,"column":13},
|