From 8b2a5c60766597392ad1cf93c89bd824def0d4a6 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 31 Jan 2023 23:22:41 -0800 Subject: [PATCH] fidelity: improved fb/instagram replay (via wabac.js 2.15.1) loading: fix incorrect loading of some WACZ files (incorrect SURT detection, fixed in wabac 2.15.2) deps: update to wabac.js 2.15.2 bump to 1.7.12 --- CHANGES.md | 5 +++++ _data/package.json | 4 ++-- package.json | 4 ++-- sw.js | 4 ++-- ui.js | 2 +- yarn.lock | 18 +++++++++--------- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index df6ad50..22ee487 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ ## CHANGES +v1.7.12 +- Fidelity: Improved replay of facebook/instagram pages (via wabac.js 2.15.1) +- Loading: Fix issue with loading certain WACZ files (incorrect SURT detection fixed, via wabac.js 2.15.2) +- Dependencies: Update to wabac.js 2.15.2 + v1.7.11 - Loading: Support loading URLs without extension (including blob: urls), automated type detection of WACZ, WARC, compressed and uncompressed (via wabac.js) - Fidelity: Improved handling of ESM modules, cookies, Vimeo videos (via wabac.js) diff --git a/_data/package.json b/_data/package.json index 9b91078..fad7541 100644 --- a/_data/package.json +++ b/_data/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.7.11", + "version": "1.7.12", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", - "@webrecorder/wabac": "^2.15.0", + "@webrecorder/wabac": "^2.15.2", "bulma": "^0.9.3", "electron-log": "^4.4.1", "electron-updater": "^5.3.0", diff --git a/package.json b/package.json index 9b91078..fad7541 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.7.11", + "version": "1.7.12", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", - "@webrecorder/wabac": "^2.15.0", + "@webrecorder/wabac": "^2.15.2", "bulma": "^0.9.3", "electron-log": "^4.4.1", "electron-updater": "^5.3.0", diff --git a/sw.js b/sw.js index dd5014b..9e10d44 100644 --- a/sw.js +++ b/sw.js @@ -22,7 +22,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */!function(t){!function(e){var i="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=o(t);function o(t,e){return function(r,i){"function"!=typeof t[r]&&Object.defineProperty(t,r,{configurable:!0,writable:!0,value:i}),e&&e(r,i)}}void 0===i.Reflect?i.Reflect=t:s=o(i.Reflect,s),function(t){var e=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,l={create:o?function(){return nt(Object.create(null))}:a?function(){return nt({__proto__:null})}:function(){return nt({})},has:c?function(t,r){return e.call(t,r)}:function(t,e){return e in t},get:c?function(t,r){return e.call(t,r)?t[r]:void 0}:function(t,e){return t[e]}},u=Object.getPrototypeOf(Function),h="object"==typeof n&&n.env&&"true"===n.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=h||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?et():Map,d=h||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?rt():Set,f=new(h||"function"!=typeof WeakMap?it():WeakMap);function g(t,e,r,i){if(P(r)){if(!q(t))throw new TypeError;if(!V(e))throw new TypeError;return S(t,e)}if(!q(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(i)&&!P(i)&&!U(i))throw new TypeError;return U(i)&&(i=void 0),I(t,e,r=z(r),i)}function w(t,e){function r(r,i){if(!F(r))throw new TypeError;if(!P(i)&&!K(i))throw new TypeError;k(t,e,r,i)}return r}function y(t,e,r,i){if(!F(r))throw new TypeError;return P(i)||(i=z(i)),k(t,e,r,i)}function m(t,e,r){if(!F(e))throw new TypeError;return P(r)||(r=z(r)),R(t,e,r)}function b(t,e,r){if(!F(e))throw new TypeError;return P(r)||(r=z(r)),x(t,e,r)}function A(t,e,r){if(!F(e))throw new TypeError;return P(r)||(r=z(r)),N(t,e,r)}function E(t,e,r){if(!F(e))throw new TypeError;return P(r)||(r=z(r)),O(t,e,r)}function _(t,e){if(!F(t))throw new TypeError;return P(e)||(e=z(e)),B(t,e)}function v(t,e){if(!F(t))throw new TypeError;return P(e)||(e=z(e)),D(t,e)}function T(t,e,r){if(!F(e))throw new TypeError;P(r)||(r=z(r));var i=C(e,r,!1);if(P(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var n=f.get(e);return n.delete(r),n.size>0||f.delete(e),!0}function S(t,e){for(var r=t.length-1;r>=0;--r){var i=(0,t[r])(e);if(!P(i)&&!U(i)){if(!V(i))throw new TypeError;e=i}}return e}function I(t,e,r,i){for(var n=t.length-1;n>=0;--n){var s=(0,t[n])(e,r,i);if(!P(s)&&!U(s)){if(!F(s))throw new TypeError;i=s}}return i}function C(t,e,r){var i=f.get(t);if(P(i)){if(!r)return;i=new p,f.set(t,i)}var n=i.get(e);if(P(n)){if(!r)return;n=new p,i.set(e,n)}return n}function R(t,e,r){if(x(t,e,r))return!0;var i=tt(e);return!U(i)&&R(t,i,r)}function x(t,e,r){var i=C(e,r,!1);return!P(i)&&j(i.has(t))}function N(t,e,r){if(x(t,e,r))return O(t,e,r);var i=tt(e);return U(i)?void 0:N(t,i,r)}function O(t,e,r){var i=C(e,r,!1);if(!P(i))return i.get(t)}function k(t,e,r,i){C(r,i,!0).set(t,e)}function B(t,e){var r=D(t,e),i=tt(t);if(null===i)return r;var n=B(i,e);if(n.length<=0)return r;if(r.length<=0)return n;for(var s=new d,o=[],a=0,c=r;a=0&&t=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n{ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var i=r(8764),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=o),o.prototype=Object.create(n.prototype),s(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2830:(t,e,r)=>{t.exports=n;var i=r(7187).EventEmitter;function n(){i.call(this)}r(5717)(n,i),n.Readable=r(9481),n.Writable=r(4229),n.Duplex=r(6753),n.Transform=r(4605),n.PassThrough=r(2725),n.finished=r(8610),n.pipeline=r(9946),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",s),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",c));var o=!1;function a(){o||(o=!0,t.end())}function c(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){r.removeListener("data",n),t.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",l),t.on("error",l),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t}},2553:(t,e,r)=>{"use strict";var i=r(9509).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=u,this.end=h,e=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},4153:t=>{const e=/0x[a-zA-Z0-9]+/,r=/^([\-\+])?(0*)(\.[0-9]+(e\-?[0-9]+)?|[0-9]+(\.[0-9]+(e\-?[0-9]+)?)?)$/,i={hex:!0,leadingZeros:!0,decimalPoint:"."};t.exports=function(t,n={}){if(n=Object.assign({},i,n),!t||"string"!=typeof t)return t;let s=t.trim();if(void 0!==n.skipLike&&n.skipLike.test(s))return t;if(n.hex&&e.test(s))return Number.parseInt(s,16);{const e=r.exec(s);if(e){e[1];const r=e[2],i=e[3];e[4]||e[6];return 1===r.length&&"."===i[0]?Number(t):!n.leadingZeros&&r.length>0?t:Number(s)}return t}}},4927:(t,e,r)=>{function i(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},2043:(t,e,r)=>{"use strict";!function(){var e,i,n,s=0,o=[];for(i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);function a(){var t,r=(t=16,(!e||s+t>c.BUFFER_SIZE)&&(s=0,e=c.randomBytes(c.BUFFER_SIZE)),e.slice(s,s+=t));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,r}function c(){var t=a();return o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){e=null,s=0},c.test=function(t){return"string"==typeof t&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},"undefined"!=typeof crypto?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||r(9061),t.exports=c,c.randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){var e=new Uint8Array(t);return n.getRandomValues(e),Array.from(e)}:function(t){var e=new Uint8Array(t);return n.getRandomValues(e),e}}return function(t){var e,r=[];for(e=0;e{},4616:()=>{},9061:()=>{}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,r),s.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i);var t={};r.r(t),r.d(t,{Any:()=>$c,BaseBlock:()=>ga,BaseStringBlock:()=>ya,BitString:()=>dc,BmpString:()=>Dc,Boolean:()=>lc,CharacterString:()=>qc,Choice:()=>tl,Constructed:()=>nc,DATE:()=>Kc,DateTime:()=>Jc,Duration:()=>Xc,EndOfContent:()=>oc,Enumerated:()=>bc,GeneralString:()=>zc,GeneralizedTime:()=>Vc,GraphicString:()=>jc,HexBlock:()=>la,IA5String:()=>Wc,Integer:()=>mc,Null:()=>ac,NumericString:()=>Uc,ObjectIdentifier:()=>_c,OctetString:()=>hc,Primitive:()=>tc,PrintableString:()=>Mc,RawData:()=>rl,RelativeObjectIdentifier:()=>Sc,Repeated:()=>el,Sequence:()=>Ic,Set:()=>Cc,TIME:()=>Zc,TeletexString:()=>Fc,TimeOfDay:()=>Yc,UTCTime:()=>Qc,UniversalString:()=>Pc,Utf8String:()=>kc,ValueBlock:()=>ha,VideotexString:()=>Hc,ViewWriter:()=>Zo,VisibleString:()=>Gc,compareSchema:()=>il,fromBER:()=>rc,verifySchema:()=>nl});const e='\n\n\n\n\nReplayWeb.page\n\n