Update Dependencies

This commit is contained in:
Leo Herzog committed 2020-09-21 21:11:57 -04:00
1 parent 286c43fe9d
commit dba74296f7
3 files changed
+14 -14

No files matched your search

+6 -6
View File
@@ -33494,12 +33494,6 @@ async function addCurrentTrackers() {
display();
}
function removeAllRows(type) {
parsed[type] = [];
updateModified();
display();
}
function addRow() {
parsed[this.dataset.type].push("");
display();
@@ -33510,6 +33504,12 @@ function removeRow() {
display();
}
function removeAllRows(type) {
parsed[type] = [];
updateModified();
display();
}
function updateModified() {
parsed.created = new Date();
parsed.createdBy = "Torrent Parts <https://torrent.parts/>";
+2 -2
View File
@@ -21,7 +21,7 @@
*/
var i,s;i=this,s=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),s=document.createRange();s.selectNodeContents(e),i.removeAllRanges(),i.addRange(s),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function s(){i.off(e,s),t.apply(n,arguments)}return s._=t,this.on(e,s,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,s=n.length;i<s;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],s=[];if(i&&t)for(var r=0,a=i.length;r<a;r++)i[r].fn!==t&&i[r].fn._!==t&&s.push(i[r]);return s.length?n[e]=s:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),s=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return s(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function s(e,t,n,i,s){var a=r.apply(this,arguments);return e.addEventListener(n,a,s),{destroy:function(){e.removeEventListener(n,a,s)}}}function r(e,t,n,s){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&s.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?s.apply(null,arguments):"function"==typeof n?s.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return s(e,t,n,i,r)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var i=n(0),s=n.n(i),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return a(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=Line truncated
/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const r=e("bencode"),a=e("block-stream2"),o=e("piece-length"),c=e("path"),l=e("filestream/read"),p=e("is-file"),u=e("junk"),d=e("multistream"),h=e("once"),f=e("run-parallel"),m=e("simple-sha1"),g=e("readable-stream"),b=e("./get-files");function v(e,t,i){var r;if(r=e,"undefined"!=typeof FileList&&r instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach(e=>{if(null==e)throw new Error("invalid input type: "+e)}),1!==(e=e.map(e=>_(e)&&"string"==typeof e.path&&"function"==typeof b?e.path:e)).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let a=null;e.forEach((t,n)=>{if("string"==typeof t)return;let i=t.fullPath||t.name;i||(i="Unknown File "+(n+1),t.unknownName=!0),t.path=i.split("/"),t.path[0]||t.path.shift(),t.path.length<2?a=null:0===n&&e.length>1?a=t.path[0]:t.path[0]!==a&&(a=null)}),e=e.filter(e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return"."!==t[0]&&u.not(t)}),a&&e.forEach(e=>{const t=(s.isBuffer(e)||y(e))&&!e.path;"string"==typeof e||t||e.path.shift()}),!t.name&&a&&(t.name=a),t.name||e.some(e=>"string"==typeof e?(t.name=c.basename(e),!0):e.unknownName?void 0:(t.name=e.path[e.path.length-1],!0)),t.name||(t.name="Unnamed Torrent "+Date.now());const o=e.reduce((e,t)=>e+Number("string"==typeof t),0);let d=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");p(e[0],(e,t)=>{if(e)return i(e);d=t,h()})}else n.nextTick(()=>{h()});function h(){f(e.map(e=>t=>{const n={};if(_(e))n.getStream=function(e){return()=>new l(e)}(e),n.length=e.size;else if(s.isBuffer(e))n.getStream=(i=e,()=>{const e=new g.PassThrough;return e.end(i),e}),n.length=e.length;else{if(!y(e)){if("string"==typeof e){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");return void b(e,o>1||d,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const n=new g.Transform;return n._transform=function(e,n,i){t.length+=e.length,this.push(e),i()},e.pipe(n),n}}(e,n),n.length=0}var i;n.path=e.path,t(null,n)}),(e,t)=>{if(e)return i(e);t=function e(t){return t.reduce((t,n)=>Array.isArray(n)?t.concat(e(n)):t.concat(n),[])}(t),i(null,t,d)})}}function x(e,t){return e+t.length}function _(e){return"undefined"!=typeof Blob&&e instanceof Blob}function y(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,n,c){"function"==typeof n&&([n,c]=[c,n]),v(e,n=n?Object.assign({},n):{},(e,l,p)=>{if(e)return c(e);n.singleFileTorrent=p,function(e,n,c){let l=n.announceList;l||("string"==typeof n.announce?l=[[n.announce]]:Array.isArray(n.announce)&&(l=n.announce.map(e=>[e])));l||(l=[]);i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?l.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(l=l.concat(i.WEBTORRENT_ANNOUNCE.map(e=>[e]))));void 0===n.announce&&void 0===n.announceList&&(l=l.concat(t.exports.announceList));"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const p={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==l.length&&(p.announce=l[0][0],p["announce-list"]=l);void 0!==n.comment&&(p.comment=n.comment);void 0!==n.createdBy&&(p["created by"]=n.createdBy);void 0!==n.private&&(p.info.private=Number(n.private));void 0!==n.info&&Object.assign(p.info,n.info);void 0!==n.sslCert&&(p.info["ssl-cert"]=n.sslCert);void 0!==n.urlList&&(p["url-list"]=n.urlList);const u=n.pieceLength||o(e.reduce(x,0));p.info["piece length"]=u,function(e,t,n){n=h(n);const i=[];let r=0;const o=e.map(e=>e.getStream);let c=0,l=0,p=!1;const u=new d(o),f=new a(t,{zeroPadding:!1});function g(e){r+=e.length;const t=l;m(e,e=>{i[t]=e,c-=1,_()}),c+=1,l+=1}function b(){p=!0,_()}function v(e){x(),n(e)}function x(){u.removeListener("error",v),f.removeListener("data",g),f.removeListener("end",b),f.removeListener("error",v)}function _(){p&&0===c&&(x(),n(null,s.from(i.join(""),"hex"),r))}u.on("error",v),u.pipe(f).on("data",g).on("end",b).on("error",v)}(e,u,(t,i,s)=>{if(t)return c(t);p.info.pieces=i,e.forEach(e=>{delete e.getStream}),n.singleFileTorrent?p.info.length=s:p.info.files=e,c(null,r.encode(p))})}(l,n,c)})},t.exports.parseInput=function(e,t,n){"function"==typeof t&&([t,n]=[n,t]),v(e,t=t?Object.assign({},t):{},n)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./get-files":46,_process:181,bencode:6,"block-stream2":30,buffer:51,"filestream/read":106,"is-file":113,junk:115,multistream:159,once:176,path:179,"piece-length":180,"readable-stream":86,"run-parallel":20Line truncated
const r=e("bencode"),a=e("block-stream2"),o=e("piece-length"),c=e("path"),l=e("filestream/read"),p=e("is-file"),u=e("junk"),d=e("multistream"),h=e("once"),f=e("run-parallel"),m=e("simple-sha1"),g=e("readable-stream"),b=e("./get-files");function v(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(v(t)):e.concat(t),[])}function x(e,t,i){var r;if(r=e,"undefined"!=typeof FileList&&r instanceof FileList&&(e=Array.from(e)),Array.isArray(e)||(e=[e]),0===e.length)throw new Error("invalid input type");e.forEach(e=>{if(null==e)throw new Error("invalid input type: "+e)}),1!==(e=e.map(e=>y(e)&&"string"==typeof e.path&&"function"==typeof b?e.path:e)).length||"string"==typeof e[0]||e[0].name||(e[0].name=t.name);let a=null;e.forEach((t,n)=>{if("string"==typeof t)return;let i=t.fullPath||t.name;i||(i="Unknown File "+(n+1),t.unknownName=!0),t.path=i.split("/"),t.path[0]||t.path.shift(),t.path.length<2?a=null:0===n&&e.length>1?a=t.path[0]:t.path[0]!==a&&(a=null)}),e=e.filter(e=>{if("string"==typeof e)return!0;const t=e.path[e.path.length-1];return"."!==t[0]&&u.not(t)}),a&&e.forEach(e=>{const t=(s.isBuffer(e)||w(e))&&!e.path;"string"==typeof e||t||e.path.shift()}),!t.name&&a&&(t.name=a),t.name||e.some(e=>"string"==typeof e?(t.name=c.basename(e),!0):e.unknownName?void 0:(t.name=e.path[e.path.length-1],!0)),t.name||(t.name="Unnamed Torrent "+Date.now());const o=e.reduce((e,t)=>e+Number("string"==typeof t),0);let d=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");p(e[0],(e,t)=>{if(e)return i(e);d=t,h()})}else n.nextTick(()=>{h()});function h(){f(e.map(e=>t=>{const n={};if(y(e))n.getStream=function(e){return()=>new l(e)}(e),n.length=e.size;else if(s.isBuffer(e))n.getStream=(i=e,()=>{const e=new g.PassThrough;return e.end(i),e}),n.length=e.length;else{if(!w(e)){if("string"==typeof e){if("function"!=typeof b)throw new Error("filesystem paths do not work in the browser");return void b(e,o>1||d,t)}throw new Error("invalid input type")}n.getStream=function(e,t){return()=>{const n=new g.Transform;return n._transform=function(e,n,i){t.length+=e.length,this.push(e),i()},e.pipe(n),n}}(e,n),n.length=0}var i;n.path=e.path,t(null,n)}),(e,t)=>{if(e)return i(e);t=v(t),i(null,t,d)})}}function _(e,t){return e+t.length}function y(e){return"undefined"!=typeof Blob&&e instanceof Blob}function w(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}t.exports=function(e,n,c){"function"==typeof n&&([n,c]=[c,n]),x(e,n=n?Object.assign({},n):{},(e,l,p)=>{if(e)return c(e);n.singleFileTorrent=p,function(e,n,c){let l=n.announceList;l||("string"==typeof n.announce?l=[[n.announce]]:Array.isArray(n.announce)&&(l=n.announce.map(e=>[e])));l||(l=[]);i.WEBTORRENT_ANNOUNCE&&("string"==typeof i.WEBTORRENT_ANNOUNCE?l.push([[i.WEBTORRENT_ANNOUNCE]]):Array.isArray(i.WEBTORRENT_ANNOUNCE)&&(l=l.concat(i.WEBTORRENT_ANNOUNCE.map(e=>[e]))));void 0===n.announce&&void 0===n.announceList&&(l=l.concat(t.exports.announceList));"string"==typeof n.urlList&&(n.urlList=[n.urlList]);const p={info:{name:n.name},"creation date":Math.ceil((Number(n.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==l.length&&(p.announce=l[0][0],p["announce-list"]=l);void 0!==n.comment&&(p.comment=n.comment);void 0!==n.createdBy&&(p["created by"]=n.createdBy);void 0!==n.private&&(p.info.private=Number(n.private));void 0!==n.info&&Object.assign(p.info,n.info);void 0!==n.sslCert&&(p.info["ssl-cert"]=n.sslCert);void 0!==n.urlList&&(p["url-list"]=n.urlList);const u=n.pieceLength||o(e.reduce(_,0));p.info["piece length"]=u,function(e,t,n){n=h(n);const i=[];let r=0;const o=e.map(e=>e.getStream);let c=0,l=0,p=!1;const u=new d(o),f=new a(t,{zeroPadding:!1});function g(e){r+=e.length;const t=l;m(e,e=>{i[t]=e,c-=1,_()}),c+=1,l+=1}function b(){p=!0,_()}function v(e){x(),n(e)}function x(){u.removeListener("error",v),f.removeListener("data",g),f.removeListener("end",b),f.removeListener("error",v)}function _(){p&&0===c&&(x(),n(null,s.from(i.join(""),"hex"),r))}u.on("error",v),u.pipe(f).on("data",g).on("end",b).on("error",v)}(e,u,(t,i,s)=>{if(t)return c(t);p.info.pieces=i,e.forEach(e=>{delete e.getStream}),n.singleFileTorrent?p.info.length=s:p.info.files=e,c(null,r.encode(p))})}(l,n,c)})},t.exports.parseInput=function(e,t,n){"function"==typeof t&&([t,n]=[n,t]),x(e,t=t?Object.assign({},t):{},n)},t.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./get-files":46,_process:181,bencode:6,"block-stream2":30,buffer:51,"filestream/read":106,"is-file":113,junk:115,multistream:159,once:176,path:179,"piece-length":180,"readable-stream":86,"run-parallel":2Line truncated
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
t.exports=s,t.exports.decode=s,t.exports.encode=function(e){(e=Object.assign({},e)).infoHashBuffer&&(e.xt="urn:btih:"+e.infoHashBuffer.toString("hex"));e.infoHash&&(e.xt="urn:btih:"+e.infoHash);e.name&&(e.dn=e.name);e.keywords&&(e.kt=e.keywords);e.announce&&(e.tr=e.announce);e.urlList&&(e.ws=e.urlList,delete e.as);let t="magnet:?";return Object.keys(e).filter(e=>2===e.length).forEach((n,i)=>{(Array.isArray(e[n])?e[n]:[e[n]]).forEach((e,s)=>{!(i>0||s>0)||"kt"===n&&0!==s||(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),t+="kt"===n&&s>0?"+"+e:`${n}=${e}`})}),t};const i=e("thirty-two");function s(e){const t={},s=e.split("magnet:?")[1];let r;if((s&&s.length>=0?s.split("&"):[]).forEach(e=>{const n=e.split("=");if(2!==n.length)return;const i=n[0];let s=n[1];"dn"===i&&(s=decodeURIComponent(s).replace(/\+/g," ")),"tr"!==i&&"xs"!==i&&"as"!==i&&"ws"!==i||(s=decodeURIComponent(s)),"kt"===i&&(s=decodeURIComponent(s).split("+")),"ix"===i&&(s=Number(s)),t[i]?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(s)):t[i]=s}),t.xt){(Array.isArray(t.xt)?t.xt:[t.xt]).forEach(e=>{if(r=e.match(/^urn:btih:(.{40})/))t.infoHash=r[1].toLowerCase();else if(r=e.match(/^urn:btih:(.{32})/)){const e=i.decode(r[1]);t.infoHash=n.from(e,"binary").toString("hex")}})}return t.infoHash&&(t.infoHashBuffer=n.from(t.infoHash,"hex")),t.dn&&(t.name=t.dn),t.kt&&(t.keywords=t.kt),"string"==typeof t.tr?t.announce=[t.tr]:Array.isArray(t.tr)?t.announce=t.tr:t.announce=[],t.urlList=[],("string"==typeof t.as||Array.isArray(t.as))&&(t.urlList=t.urlList.concat(t.as)),("string"==typeof t.ws||Array.isArray(t.ws))&&(t.urlList=t.urlList.concat(t.ws)),t.announce=Array.from(new Set(t.announce)),t.urlList=Array.from(new Set(t.urlList)),t}}).call(this,e("buffer").Buffer)},{buffer:51,"thirty-two":272}],117:[function(e,t,n){t.exports=o;var i=e("inherits"),s=e("readable-stream"),r=e("to-arraybuffer"),a="undefined"!=typeof window&&window.MediaSource;function o(e,t){var n=this;if(!(n instanceof o))return new o(e,t);if(!a)throw new Error("web browser lacks MediaSource support");t||(t={}),n._debug=t.debug,n._bufferDuration=t.bufferDuration||60,n._elem=e,n._mediaSource=new a,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler),n._streams.slice().forEach((function(e){e.destroy(n._elem.error)}))},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function c(e,t){var n=this;if(s.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._debugBuffers=[],n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},n._errorHandler=function(e){n.destroyed||n.emit("error",e)},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._debugBuffers=t._debugBuffers,n._sourceBuffer.addEventListener("updateend",n._flowHandler),n._sourceBuffer.addEventListener("error",n._errorHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",(function(e){n._wrapper.error(e)})),n.on("finish",(function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every((function(e){return e._finished})))){n._wrapper._dumpDebugData();try{n._mediaSource.endOfStream()}catch(e){}}}))}o.prototype.createWriteStream=function(e){return new c(this,e)},o.prototype.error=function(e){var t=this;t.detailedError||(t.detailedError=e),t._dumpDebugData();try{t._mediaSource.endOfStream("decode")}catch(e){}try{window.URL.revokeObjectURL(t._elem.src)}catch(e){}},o.prototype._dumpDebugData=function(){var e=this;e._debug&&(e._debug=!1,e._streams.forEach((function(e,t){var n,i,s;n=e._debugBuffers,i="mediasource-stream-"+t,(s=document.createElement("a")).href=window.URL.createObjectURL(new window.Blob(n)),s.download=i,s.click()})))},i(c,s.Writable),c.prototype._onSourceOpen=function(){var e=this;e.destroyed||(e._mediaSource.removeEventListener("sourceopen",e._openHandler),e._createSourceBuffer())},c.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,t._allStreams.splice(t._allStreams.indexOf(t),1),t._mediaSource.removeEventListener("sourceopen",t._openHandler),t._elem.removeEventListener("timeupdate",t._flowHandler),t._sourceBuffer&&(t._sourceBuffer.removeEventListener("updateend",t._flowHandler),t._sourceBuffer.removeEventListener("error",t._errorHandler),"open"===t._mediaSource.readyState&&t._sourceBLine truncated
/*!
@@ -60,4 +60,4 @@ const i=e("debug")("torrent-discovery"),s=e("bittorrent-dht/client"),r=e("events
/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const{EventEmitter:i}=e("events"),s=e("bencode"),r=e("bitfield"),a=e("debug")("ut_metadata"),o=e("simple-sha1"),c=16384;t.exports=e=>{class t extends i{constructor(t){super(),this._wire=t,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new r(0,{grow:1e3}),n.isBuffer(e)&&this.setMetadata(e)}onHandshake(e,t,n){this._infoHash=e}onExtendedHandshake(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||1e7<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/c),this._remainingRejects=2*this._numPieces,void this._requestPieces()):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(e){let t,n;try{const i=e.toString(),r=i.indexOf("ee")+2;t=s.decode(i.substring(0,r)),n=e.slice(r)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,t.total_size);break;case 2:this._onReject(t.piece)}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(e){if(this._metadataComplete)return!0;a("set metadata");try{const t=s.decode(e).info;t&&(e=s.encode(t))}catch(e){}return(!this._infoHash||this._infoHash===o.sync(e))&&(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",s.encode({info:s.decode(this.metadata)})),!0)}_send(e,t){let i=s.encode(e);n.isBuffer(t)&&(i=n.concat([i,t])),this._wire.extended("ut_metadata",i)}_request(e){this._send({msg_type:0,piece:e})}_data(e,t,n){const i={msg_type:1,piece:e};"number"==typeof n&&(i.total_size=n),this._send(i,t)}_reject(e){this._send({msg_type:2,piece:e})}_onRequest(e){if(!this._metadataComplete)return void this._reject(e);const t=e*c;let n=t+c;n>this._metadataSize&&(n=this._metadataSize);const i=this.metadata.slice(t,n);this._data(e,i,this._metadataSize)}_onData(e,t,n){t.length>c||!this._fetching||(t.copy(this.metadata,e*c),this._bitfield.set(e),this._checkDone())}_onReject(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))}_requestPieces(){if(this._fetching){this.metadata=n.alloc(this._metadataSize);for(let e=0;e<this._numPieces;e++)this._request(e)}}_checkDone(){let e=!0;for(let t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(!e)return;this.setMetadata(this.metadata)||this._failedMetadata()}_failedMetadata(){this._bitfield=new r(0,{grow:1e3}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return t.prototype.name="ut_metadata",t}}).call(this,e("buffer").Buffer)},{bencode:6,bitfield:8,buffer:51,debug:87,events:90,"simple-sha1":230}],283:[function(e,t,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],284:[function(e,t,n){(function(n){const i=e("binary-search"),s=e("events"),r=e("mp4-stream"),a=e("mp4-box-encoding"),o=e("range-slice-stream");class c{constructor(e,t){this._entries=e,this._countName=t||"count",this._index=0,this._offset=0,this.value=this._entries[0]}inc(){this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]}}const l=1;t.exports=class extends s{constructor(e){super(),this._tracks=[],this._file=e,this._decoder=null,this._findMoov(0)}_findMoov(e){this._decoder&&this._decoder.destroy();let t=0;this._decoder=r.decode();const n=this._file.createReadStream({start:e});n.pipe(this._decoder);const i=s=>{"moov"===s.type?(this._decoder.removeListener("box",i),this._decoder.decode(e=>{n.destroy();try{this._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,this.emit("error",e)}})):s.length<4096?(t+=s.length,this._decoder.ignore()):(this._decoder.removeListener("box",i),t+=s.length,n.destroy(),this._decoder.destroy(),this._findMoov(e+t))};this._decoder.on("box",i)}_processMoov(e){const t=e.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let n=0;n<t.length;n++){const s=t[n],r=s.mdia.minf.stbl,a=r.stsd.entries[0],o=s.mdia.hdlr.handlerType;let l,p;if("vide"===o&&"avc1"===a.type){if(this._hasVideo)continue;this._hasVideo=!0,l="avc1",a.avcC&&(l+="."+a.avcC.mimeCodec),p=Line truncated
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const{EventEmitter:r}=e("events"),a=e("simple-concat"),o=e("create-torrent"),c=e("debug")("webtorrent"),l=e("bittorrent-dht/client"),p=e("load-ip-set"),u=e("run-parallel"),d=e("parse-torrent"),h=e("path"),f=e("simple-peer"),m=e("randombytes"),g=e("speedometer"),b=e("./lib/tcp-pool"),v=e("./lib/torrent"),x=e("./package.json").version,_=x.replace(/\d*./g,e=>("0"+e%100).slice(-2)).slice(0,4),y=`-WW${_}-`;class w extends r{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:s.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=s.from(y+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=s.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:s.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=s.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),i.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=i.WRTC)),"function"==typeof b?this._tcpPool=new b(this):n.nextTick(()=>{this._onListening()}),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.dht)),this.dht.once("error",e=>{this._destroy(e)}),this.dht.once("listening",()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)}),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==e.webSeeds;const t=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof p&&null!=e.blocklist?p(e.blocklist,{headers:{"user-agent":`WebTorrent/${x} (https://webtorrent.io)`}},(e,n)=>{if(e)return this.error("Failed to load blocklist: "+e.message);this.blocked=n,t()}):n.nextTick(t)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter(e=>1!==e.progress);return e.reduce((e,t)=>e+t.downloaded,0)/(e.reduce((e,t)=>e+(t.length||0),0)||1)}get ratio(){return this.torrents.reduce((e,t)=>e+t.uploaded,0)/(this.torrents.reduce((e,t)=>e+t.received,0)||1)}get(e){if(e instanceof v){if(this.torrents.includes(e))return e}else{let t;try{t=d(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const i=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===r.infoHash&&e!==r)return void r._destroy(new Error("Cannot add duplicate torrent "+r.infoHash))},s=()=>{this.destroyed||("function"==typeof n&&n(r),this.emit("torrent",r))};this._debug("add"),t=t?Object.assign({},t):{};const r=new v(e,this,t);return this.torrents.push(r),r.once("_infoHash",i),r.once("ready",s),r.once("close",(function e(){r.removeListener("_infoHash",i),r.removeListener("ready",s),r.removeListener("close",e)})),r}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),(t=t?Object.assign({},t):{}).skipVerify=!0;const i="string"==typeof e;i&&(t.path=h.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+_);const s=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},r=this.add(null,t,e=>{const t=[t=>{if(i)return t();e.load(c,t)}];this.dht&&t.push(t=>{e.once("dhtAnnounce",t)}),u(t,t=>{if(!this.destroyed)return t?e._destroy(t):void s(e)})});let c;var l;return l=e,"undefined"!=typeof FileList&&l instanceof FileList?e=Array.from(e):Array.isArray(e)||(e=[e]),u(e.map(e=>t=>{!function(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}(e)?t(null,e):a(e,t)}),(e,n)=>{if(!this.destroyed)return e?r._destroy(e):void o.parseInput(n,t,(e,i)=>{if(!this.destroyed){if(e)return r._destroy(e);c=i.map(e=>e.getStream),o(n,t,(e,t)=>{if(this.destroyed)return;if(e)return r._destroy(e);const n=this.get(t);n?r._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):r._onTorrentId(t)})}})}),r}remove(e,t){this._debug("remove");if(!this.get(e))throw new Error("No torrent with id "+e);this._remove(e,t)}_remove(e,t){const n=this.get(e);n&&(this.torrents.splice(this.torrents.indexOf(n),1),n.destroy(t))}address(){retLine truncated
const{EventEmitter:r}=e("events"),a=e("simple-concat"),o=e("create-torrent"),c=e("debug")("webtorrent"),l=e("bittorrent-dht/client"),p=e("load-ip-set"),u=e("run-parallel"),d=e("parse-torrent"),h=e("path"),f=e("simple-peer"),m=e("randombytes"),g=e("speedometer"),b=e("./lib/tcp-pool"),v=e("./lib/torrent"),x=e("./package.json").version,_=x.replace(/\d*./g,e=>("0"+e%100).slice(-2)).slice(0,4),y=`-WW${_}-`;class w extends r{constructor(e={}){super(),"string"==typeof e.peerId?this.peerId=e.peerId:s.isBuffer(e.peerId)?this.peerId=e.peerId.toString("hex"):this.peerId=s.from(y+m(9).toString("base64")).toString("hex"),this.peerIdBuffer=s.from(this.peerId,"hex"),"string"==typeof e.nodeId?this.nodeId=e.nodeId:s.isBuffer(e.nodeId)?this.nodeId=e.nodeId.toString("hex"):this.nodeId=m(20).toString("hex"),this.nodeIdBuffer=s.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=e.torrentPort||0,this.dhtPort=e.dhtPort||0,this.tracker=void 0!==e.tracker?e.tracker:{},this.torrents=[],this.maxConns=Number(e.maxConns)||55,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=e.wrtc),i.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=i.WRTC)),"function"==typeof b?this._tcpPool=new b(this):n.nextTick(()=>{this._onListening()}),this._downloadSpeed=g(),this._uploadSpeed=g(),!1!==e.dht&&"function"==typeof l?(this.dht=new l(Object.assign({},{nodeId:this.nodeId},e.dht)),this.dht.once("error",e=>{this._destroy(e)}),this.dht.once("listening",()=>{const e=this.dht.address();e&&(this.dhtPort=e.port)}),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==e.webSeeds;const t=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof p&&null!=e.blocklist?p(e.blocklist,{headers:{"user-agent":`WebTorrent/${x} (https://webtorrent.io)`}},(e,n)=>{if(e)return this.error("Failed to load blocklist: "+e.message);this.blocked=n,t()}):n.nextTick(t)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const e=this.torrents.filter(e=>1!==e.progress);return e.reduce((e,t)=>e+t.downloaded,0)/(e.reduce((e,t)=>e+(t.length||0),0)||1)}get ratio(){return this.torrents.reduce((e,t)=>e+t.uploaded,0)/(this.torrents.reduce((e,t)=>e+t.received,0)||1)}get(e){if(e instanceof v){if(this.torrents.includes(e))return e}else{let t;try{t=d(e)}catch(e){}if(!t)return null;if(!t.infoHash)throw new Error("Invalid torrent identifier");for(const e of this.torrents)if(e.infoHash===t.infoHash)return e}return null}download(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)}add(e,t={},n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]);const i=()=>{if(!this.destroyed)for(const e of this.torrents)if(e.infoHash===r.infoHash&&e!==r)return void r._destroy(new Error("Cannot add duplicate torrent "+r.infoHash))},s=()=>{this.destroyed||("function"==typeof n&&n(r),this.emit("torrent",r))};this._debug("add"),t=t?Object.assign({},t):{};const r=new v(e,this,t);return this.torrents.push(r),r.once("_infoHash",i),r.once("ready",s),r.once("close",(function e(){r.removeListener("_infoHash",i),r.removeListener("ready",s),r.removeListener("close",e)})),r}seed(e,t,n){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof t&&([t,n]=[{},t]),this._debug("seed"),(t=t?Object.assign({},t):{}).skipVerify=!0;const i="string"==typeof e;i&&(t.path=h.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+_);const s=e=>{this._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),this.emit("seed",e)},r=this.add(null,t,e=>{const t=[t=>{if(i)return t();e.load(c,t)}];this.dht&&t.push(t=>{e.once("dhtAnnounce",t)}),u(t,t=>{if(!this.destroyed)return t?e._destroy(t):void s(e)})});let c;var l;return l=e,"undefined"!=typeof FileList&&l instanceof FileList?e=Array.from(e):Array.isArray(e)||(e=[e]),u(e.map(e=>t=>{!function(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}(e)?t(null,e):a(e,t)}),(e,n)=>{if(!this.destroyed)return e?r._destroy(e):void o.parseInput(n,t,(e,i)=>{if(!this.destroyed){if(e)return r._destroy(e);c=i.map(e=>e.getStream),o(n,t,(e,t)=>{if(this.destroyed)return;if(e)return r._destroy(e);const n=this.get(t);n?r._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):r._onTorrentId(t)})}})}),r}remove(e,t){this._debug("remove");if(!this.get(e))throw new Error("No torrent with id "+e);this._remove(e,t)}_remove(e,t){const n=this.get(e);n&&(this.torrents.splice(this.torrents.indexOf(n),1),n.destroy(t))}address(){retLine truncated
+6 -6
View File
@@ -307,12 +307,6 @@ async function addCurrentTrackers() {
display();
}
function removeAllRows(type) {
parsed[type] = [];
updateModified();
display();
}
function addRow() {
parsed[this.dataset.type].push("");
display();
@@ -323,6 +317,12 @@ function removeRow() {
display();
}
function removeAllRows(type) {
parsed[type] = [];
updateModified();
display();
}
function updateModified() {
parsed.created = new Date();
parsed.createdBy = "Torrent Parts <https://torrent.parts/>";