replaywebpage 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,13 @@ import { Pages } from "./pages";
10
10
  import { PageEntry } from "./pageentry";
11
11
  import { Replay } from "./replay";
12
12
  import { Sorter } from "./sorter";
13
- import { SWManager } from "./swmanager";
13
+ import { SWManager, serviceWorkerActivated } from "./swmanager";
14
14
  import { URLResources } from "./url-resources";
15
15
  import { Embed } from "./embed";
16
16
  import "./coll-description";
17
17
  import "./shoelace";
18
+ import rwpIcon from "~assets/icons/replaywebpage.svg";
19
+ import rwpLogoAnimated from "~assets/brand/replaywebpage-icon-color-animated.svg";
18
20
  export { ReplayWebApp, Chooser, ItemIndex, ItemInfo, Item,
19
21
  /**
20
22
  * @deprecated use {@linkcode ItemIndex}
@@ -31,8 +33,10 @@ Item as Coll, Story, GDrive, Loader, Pages, PageEntry, Replay, Sorter, URLResour
31
33
  /**
32
34
  * @deprecated use {@linkcode ReplayWebPage}
33
35
  */
34
- Embed, Embed as ReplayWebPage, SWManager, };
36
+ Embed, Embed as ReplayWebPage, SWManager, serviceWorkerActivated, rwpIcon, rwpLogoAnimated, };
35
37
  export type { ItemType, URLResource } from "./types";
36
38
  export type { EmbedReplayEvent } from "./item";
37
39
  export * from "./misc";
40
+ export * from "./pageutils";
41
+ export * from "./utils/dateTimeFormatter";
38
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;A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Q,CAAC,KAAK,IAAI,CAAC;IAE/D,YAAY;IAKZ,YAAY;IAmFN,MAAM;IA6GZ,eAAe;IAKf,WAAW,CAAC,KAAK,EAAE,WAAW;IAaxB,QAAQ;IAgCd,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAW/C,MAAM,KAAK,MAAM,iCAsChB;IAED,MAAM;IA4BN,aAAa;IAqDb,OAAO,CAAC,iBAAiB;IAuCnB,eAAe;CAUtB;AAID,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -44,5 +44,15 @@ declare class WrModal extends LitElement {
44
44
  render(): import("lit-html").TemplateResult<1>;
45
45
  onClose(): void;
46
46
  }
47
- export { wrapCss, IS_APP, VERSION, clickOnSpacebarPress, FaIcon, WrModal, LitElement, html, css, unsafeCSS, unsafeSVG, apiPrefix, replayPrefix, };
47
+ export { wrapCss, IS_APP, VERSION, clickOnSpacebarPress, FaIcon, WrModal,
48
+ /** @deprecated Import this directly from `lit` instead */
49
+ LitElement,
50
+ /** @deprecated Import this directly from `lit` instead */
51
+ html,
52
+ /** @deprecated Import this directly from `lit` instead */
53
+ css,
54
+ /** @deprecated Import this directly from `lit/directives/unsafe-css.js` instead */
55
+ unsafeCSS,
56
+ /** @deprecated Import this directly from `lit/directives/unsafe-svg.js` instead */
57
+ unsafeSVG, apiPrefix, replayPrefix, };
48
58
  //# sourceMappingURL=misc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/misc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAKzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,QAAA,MAAM,SAAS,YAAY,CAAC;AAC5B,QAAA,MAAM,YAAY,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AKD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,QAc1D;AAGD,cAAM,MAAO,SAAQ,UAAU;;IAW7B,MAAM,KAAK,UAAU;;;;;;;;;;;;;MAOpB;IAED,MAAM,KAAK,MAAM,4BAchB;IAED,MAAM;CAsCP;AAGD,cAAM,OAAQ,SAAQ,UAAU;;IAW9B,MAAM,KAAK,UAAU;;;;;;;;;;MAMpB;IAED,MAAM,KAAK,MAAM,mBAehB;IAED,MAAM;IA8BN,OAAO;CAGR;AAMD,OAAO,EACL,OAAO,EACP,MAAM,EACN,OAAO,EACP,oBAAoB,EACpB,MAAM,EACN,OAAO;AACP,0DAA0D;AAC1D,UAAU;AACV,0DAA0D;AAC1D,IAAI;AACJ,0DAA0D;AAC1D,GAAG;AACH,mFAAmF;AACnF,SAAS;AACT,mFAAmF;AACnF,SAAS,EACT,SAAS,EACT,YAAY,GACb,CAAC"}
@@ -17,4 +17,5 @@ export declare class SWManager {
17
17
  getSWErrorMsg(): string | null;
18
18
  renderErrorReport(override?: string): import("lit-html").TemplateResult<1> | "";
19
19
  }
20
+ export declare function serviceWorkerActivated(): Promise<void>;
20
21
  //# sourceMappingURL=swmanager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"swmanager.d.ts","sourceRoot":"","sources":["../../src/swmanager.ts"],"names":[],"mappings":"AAKA,qBAAa,SAAS;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,OAAO,CAAC;IAEhC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEnB,EACV,IAAc,EACd,KAAY,EACZ,OAA0B,EAC1B,sBAA8B,GAC/B;;;;;KAAK;IAON,UAAU,CAAC,UAAU,EAAE,MAAM;IAIvB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA8C/B,uBAAuB;IAWvB,mBAAmB;IAanB,aAAa;IAiCb,iBAAiB,CAAC,QAAQ,SAAK;CAsBhC"}
1
+ {"version":3,"file":"swmanager.d.ts","sourceRoot":"","sources":["../../src/swmanager.ts"],"names":[],"mappings":"AAKA,qBAAa,SAAS;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,OAAO,CAAC;IAEhC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEnB,EACV,IAAc,EACd,KAAY,EACZ,OAA0B,EAC1B,sBAA8B,GAC/B;;;;;KAAK;IAON,UAAU,CAAC,UAAU,EAAE,MAAM;IAIvB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA8C/B,uBAAuB;IAWvB,mBAAmB;IAanB,aAAa;IAiCb,iBAAiB,CAAC,QAAQ,SAAK;CAsBhC;AAED,wBAAsB,sBAAsB,kBAU3C"}
@@ -0,0 +1,2 @@
1
+ export declare function assertNonNullish<T>(item: T, itemName: string): asserts item is NonNullable<T>;
2
+ //# sourceMappingURL=assertNonNullish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertNonNullish.d.ts","sourceRoot":"","sources":["../../../src/utils/assertNonNullish.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC,CAQhC"}
@@ -0,0 +1,5 @@
1
+ export * from "./dateTimeFormatter";
2
+ export * from "./assertNonNullish";
3
+ export * from "../pageutils";
4
+ export { SWManager, serviceWorkerActivated } from "../swmanager";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
package/dist/utils.js ADDED
@@ -0,0 +1,32 @@
1
+ /*! 'utils.js is part of ReplayWeb.page (https://replayweb.page) Copyright (C) 2020-2025, Webrecorder Software. Licensed under the Affero General Public License v3.' */var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{iN:()=>xt,xm:()=>n,R8:()=>s,kS:()=>i,Yl:()=>a,Kf:()=>c,Lx:()=>l,W4:()=>u,ap:()=>d,tf:()=>f,TV:()=>Tt,C:()=>p,yv:()=>r,jH:()=>h});const i=new Intl.DateTimeFormat([...navigator.languages],{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),s=new Intl.DateTimeFormat([...navigator.languages],{month:"2-digit",day:"2-digit",year:"numeric"}),r=new Intl.DateTimeFormat([...navigator.languages],{hour:"2-digit",minute:"2-digit",second:"2-digit"});function n(t,e){if(null==t)throw new Error(`Variable \`${e}\` was expected to be defined, but found value ${t} (${typeof t}) instead`)}function o(t,e,i,s){return new(i||(i=Promise))((function(r,n){function o(t){try{h(s.next(t))}catch(t){n(t)}}function a(t){try{h(s.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((s=s.apply(t,e||[])).next())}))}Object.create;Object.create;function a(t,e){return o(this,void 0,void 0,(function*(){const i=(new TextEncoder).encode(t),s=yield crypto.subtle.digest(e,i),r=Array.from(new Uint8Array(s)).map((t=>t.toString(16).padStart(2,"0"))).join("");return r}))}function h(t){if(!t)return"";t.length<14&&(t+="00000101000000".substr(t.length));const e=t.substring(0,4)+"-"+t.substring(4,6)+"-"+t.substring(6,8)+"T"+t.substring(8,10)+":"+t.substring(10,12)+":"+t.substring(12,14)+"-00:00";return new Date(e)}function c(t){let e=null;e=new Date(t);return e&&e instanceof Date?d(e.toISOString()):""}function l(t){let e=null;try{e=new Date(t.ts||t.date)}catch(t){}const i=e&&e instanceof Date?d(e.toISOString()):"";return{date:e,timestamp:i}}function d(t){return t.replace(/[-:T]/g,"").slice(0,14)}function u(t,e,i,s){const r=new URLSearchParams;return r.set("view",t),r.set("url",e),r.set("ts",i),s&&r.set("waczhash",s),"#"+r.toString()}function p(t){return o(this,void 0,void 0,(function*(){try{new URL(t)}catch(e){t=new URL(t,document.baseURI).href}const e="id-"+(yield a(t,"SHA-256")).slice(0,12);return{url:t,item:e}}))}function f(t){let e=t.indexOf("://"),i=0,s="",r="",n="";return e>=0?(s=t.slice(0,e),e+=3):(e++,t.startsWith("//")&&(e+=2)),i=t.indexOf("/",e),i>0?(r=t.slice(e,i),n=t.slice(i)):(r=t.slice(e),n=""),{scheme:s,host:r,path:n}}
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const g=globalThis,m=g.ShadowRoot&&(void 0===g.ShadyCSS||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$=Symbol(),_=new WeakMap;class v{constructor(t,e,i){if(this._$cssResult$=!0,i!==$)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(m&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=_.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&_.set(e,t))}return t}toString(){return this.cssText}}const y=(t,e)=>{if(m)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=g.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},A=m?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new v("string"==typeof t?t:t+"",void 0,$))(e)})(t):t,{is:w,defineProperty:S,getOwnPropertyDescriptor:b,getOwnPropertyNames:E,getOwnPropertySymbols:P,getPrototypeOf:C}=Object,x=globalThis,T=x.trustedTypes,U=T?T.emptyScript:"",M=x.reactiveElementPolyfillSupport,O=(t,e)=>t,N={toAttribute(t,e){switch(e){case Boolean:t=t?U:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},H=(t,e)=>!w(t,e),R={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;class k extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=R){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&S(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=b(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const n=s?.call(this);r.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??R}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const t=C(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const t=this.properties,e=[...E(t),...P(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(A(t))}else void 0!==t&&e.push(A(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return y(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:N).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:N;this._$Em=s,this[s]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??H)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[O("elementProperties")]=new Map,k[O("finalized")]=new Map,M?.({ReactiveElement:k}),(x.reactiveElementVersions??=[]).push("2.0.4");
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */
13
+ const W=globalThis,I=W.trustedTypes,L=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,D="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+j,B=`<${z}>`,F=document,V=()=>F.createComment(""),q=t=>null===t||"object"!=typeof t&&"function"!=typeof t,K=Array.isArray,J=t=>K(t)||"function"==typeof t?.[Symbol.iterator],Y="[ \t\n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,Q=/>/g,X=RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,et=/"/g,it=/^(?:script|style|textarea|title)$/i,st=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),rt=st(1),nt=(st(2),Symbol.for("lit-noChange")),ot=Symbol.for("lit-nothing"),at=new WeakMap,ht=F.createTreeWalker(F,129);function ct(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==L?L.createHTML(e):e}const lt=(t,e)=>{const i=t.length-1,s=[];let r,n=2===e?"<svg>":"",o=Z;for(let e=0;e<i;e++){const i=t[e];let a,h,c=-1,l=0;for(;l<i.length&&(o.lastIndex=l,h=o.exec(i),null!==h);)l=o.lastIndex,o===Z?"!--"===h[1]?o=G:void 0!==h[1]?o=Q:void 0!==h[2]?(it.test(h[2])&&(r=RegExp("</"+h[2],"g")),o=X):void 0!==h[3]&&(o=X):o===X?">"===h[0]?(o=r??Z,c=-1):void 0===h[1]?c=-2:(c=o.lastIndex-h[2].length,a=h[1],o=void 0===h[3]?X:'"'===h[3]?et:tt):o===et||o===tt?o=X:o===G||o===Q?o=Z:(o=X,r=void 0);const d=o===X&&t[e+1].startsWith("/>")?" ":"";n+=o===Z?i+B:c>=0?(s.push(a),i.slice(0,c)+D+i.slice(c)+j+d):i+j+(-2===c?e:d)}return[ct(t,n+(t[i]||"<?>")+(2===e?"</svg>":"")),s]};class dt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,n=0;const o=t.length-1,a=this.parts,[h,c]=lt(t,e);if(this.el=dt.createElement(h,i),ht.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=ht.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(D)){const e=c[n++],i=s.getAttribute(t).split(j),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:o[2],strings:i,ctor:"."===o[1]?mt:"?"===o[1]?$t:"@"===o[1]?_t:gt}),s.removeAttribute(t)}else t.startsWith(j)&&(a.push({type:6,index:r}),s.removeAttribute(t));if(it.test(s.tagName)){const t=s.textContent.split(j),e=t.length-1;if(e>0){s.textContent=I?I.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],V()),ht.nextNode(),a.push({type:2,index:++r});s.append(t[e],V())}}}else if(8===s.nodeType)if(s.data===z)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(j,t+1));)a.push({type:7,index:r}),t+=j.length-1}r++}}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function ut(t,e,i=t,s){if(e===nt)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const n=q(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=ut(t,r._$AS(t,e.values),r,s)),e}class pt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??F).importNode(e,!0);ht.currentNode=s;let r=ht.nextNode(),n=0,o=0,a=i[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new ft(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new vt(r,this,t)),this._$AV.push(e),a=i[++o]}n!==a?.index&&(r=ht.nextNode(),n++)}return ht.currentNode=F,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ft{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=ot,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ut(this,t,e),q(t)?t===ot||null==t||""===t?(this._$AH!==ot&&this._$AR(),this._$AH=ot):t!==this._$AH&&t!==nt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):J(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==ot&&q(this._$AH)?this._$AA.nextSibling.data=t:this.T(F.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=dt.createElement(ct(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new pt(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=at.get(t.strings);return void 0===e&&at.set(t.strings,e=new dt(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new ft(this.S(V()),this.S(V()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class gt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=ot,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ot}_$AI(t,e=this,i,s){const r=this.strings;let n=!1;if(void 0===r)t=ut(this,t,e,0),n=!q(t)||t!==this._$AH&&t!==nt,n&&(this._$AH=t);else{const s=t;let o,a;for(t=r[0],o=0;o<r.length-1;o++)a=ut(this,s[i+o],e,o),a===nt&&(a=this._$AH[o]),n||=!q(a)||a!==this._$AH[o],a===ot?t=ot:t!==ot&&(t+=(a??"")+r[o+1]),this._$AH[o]=a}n&&!s&&this.j(t)}j(t){t===ot?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class mt extends gt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ot?void 0:t}}class $t extends gt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ot)}}class _t extends gt{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=ut(this,t,e,0)??ot)===nt)return;const i=this._$AH,s=t===ot&&i!==ot||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==ot&&(i===ot||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class vt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ut(this,t)}}const yt=W.litHtmlPolyfillSupport;yt?.(dt,ft),(W.litHtmlVersions??=[]).push("3.1.4");
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
18
+ */
19
+ class At extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new ft(e.insertBefore(V(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return nt}}At._$litElement$=!0,At.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:At});const wt=globalThis.litElementPolyfillSupport;wt?.({LitElement:At});(globalThis.litElementVersions??=[]).push("4.0.6");var St;function bt(t,e){void 0===e&&(e={});var i=e.registrationOptions;void 0===i&&(i={}),delete e.registrationOptions;var s=function(t){for(var i=[],s=arguments.length-1;s-- >0;)i[s]=arguments[s+1];e&&e[t]&&e[t].apply(e,i)};"serviceWorker"in navigator&&St.then((function(){Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))?(!function(t,e,i){fetch(t).then((function(s){404===s.status?(e("error",new Error("Service worker not found at "+t)),Ct()):-1===s.headers.get("content-type").indexOf("javascript")?(e("error",new Error("Expected "+t+" to have javascript content-type, but received "+s.headers.get("content-type"))),Ct()):Pt(t,e,i)})).catch((function(t){return Et(e,t)}))}(t,s,i),navigator.serviceWorker.ready.then((function(t){s("ready",t)})).catch((function(t){return Et(s,t)}))):(Pt(t,s,i),navigator.serviceWorker.ready.then((function(t){s("ready",t)})).catch((function(t){return Et(s,t)})))}))}function Et(t,e){navigator.onLine||t("offline"),t("error",e)}function Pt(t,e,i){navigator.serviceWorker.register(t,i).then((function(t){e("registered",t),t.waiting?e("updated",t):t.onupdatefound=function(){e("updatefound",t);var i=t.installing;i.onstatechange=function(){"installed"===i.state&&(navigator.serviceWorker.controller?e("updated",t):e("cached",t))}}})).catch((function(t){return Et(e,t)}))}function Ct(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(t){t.unregister()})).catch((function(t){return Et(emit,t)}))}"undefined"!=typeof window&&(St="undefined"!=typeof Promise?new Promise((function(t){return window.addEventListener("load",t)})):{then:function(t){return window.addEventListener("load",t)}});class xt{constructor({name:t="sw.js",scope:e="./",appName:i="ReplayWeb.page",requireSubdomainIframe:s=!1}={}){this.errorMsg=null,this.name=t,this.scope=e,this.appName=i,this.requireSubdomainIframe=s}setAppName(t){this.appName=t}register(){return o(this,void 0,void 0,(function*(){let t,e;const i=new Promise(((i,s)=>{t=i,e=s}));this.errorMsg=this.getSWErrorMsg(),this.errorMsg&&(console.error(this.errorMsg),e(this.errorMsg));const s=t=>{console.error("Error during service worker registration:",t),this.errorMsg=this.getCrossOriginIframeMsg(),this.errorMsg||(this.errorMsg=`${this.appName} could not be loaded due to the following error:\n${t.toString()}`),e(this.errorMsg)};return bt(this.scope+this.name,{registrationOptions:{scope:this.scope},registered(){console.log("Service worker is registered"),t()},error(t){s(t)}}),i}))}getCrossOriginIframeMsg(){return this.isCrossOriginIframe()?` Sorry, Service Workers can not be used in cross-origin iframes.\n This web archive embed is loaded from ${window.location.origin} but the top page is on a different origin.\n The embed must be loaded from the same origin or a subdomain.`:null}isCrossOriginIframe(){if(window.parent===window)return!1;try{return""===window.top.location.href}catch(t){return!0}}getSWErrorMsg(){if(navigator.serviceWorker)return this.requireSubdomainIframe&&!this.isCrossOriginIframe()?`Sorry, due to security settings, this ${this.appName} embed only be viewed within a subdomain iframe.`:null;const t=this.getCrossOriginIframeMsg();return t||(window.isSecureContext?"MozAppearance"in document.documentElement.style?"Sorry, Service Workers are disabled in Firefox in Private Mode. Please try loading this page in regular mode instead.":`Sorry, ${this.appName} won't work in this browser as Service Workers are not supported in this window.\n Please try a different browser.`:`\n Sorry, the ${this.appName} system must be loaded from an HTTPS URL (or localhost), but was loaded from: ${window.location.host}.\n Please try loading this page from an HTTPS URL`)}renderErrorReport(t=""){const e=this.errorMsg||t;return e?rt`
20
+ <section class="is-fullwidth">
21
+ <div class="has-text-centered">
22
+ <fa-icon
23
+ style="margin: 1em;flex-grow: 1;"
24
+ id="wrlogo"
25
+ size="2.5rem"
26
+ .svg=${'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 24 24"><path d="M6.807 11.246h-.001a.25.25 0 0 1-.245-.294 5.55 5.55 0 0 1 3.082-3.959.124.124 0 0 1 .176.111.1.1 0 0 1-.011.05c-.426 1.035-.719 2.371-.81 3.856a.25.25 0 0 1-.249.236zm7.364-4.091a.13.13 0 0 1 .027-.138.13.13 0 0 1 .139-.025 5.54 5.54 0 0 1 3.081 3.96.252.252 0 0 1-.245.293l-1.942.001a.25.25 0 0 1-.249-.236c-.091-1.485-.384-2.821-.811-3.855m3.002 5.591c.074 0 .144.033.192.089a.25.25 0 0 1 .054.205A5.54 5.54 0 0 1 14.337 17a.13.13 0 0 1-.139-.025.13.13 0 0 1-.026-.138c.426-1.033.719-2.369.81-3.856a.25.25 0 0 1 .249-.235zm-7.364 4.091q.01.024.01.05a.126.126 0 0 1-.176.114 5.55 5.55 0 0 1-3.081-3.961.25.25 0 0 1 .054-.204.25.25 0 0 1 .191-.088c.495-.002 1.488-.002 1.942-.002a.25.25 0 0 1 .249.235c.091 1.487.384 2.823.811 3.856m.694-3.825a.25.25 0 0 1 .066-.187.25.25 0 0 1 .183-.078l2.477-.001a.25.25 0 0 1 .249.25v.016c-.107 1.583-.461 2.962-.997 3.872q-.166.297-.414.531a.126.126 0 0 1-.154 0 2.2 2.2 0 0 1-.414-.531c-.536-.91-.89-2.289-.996-3.872m2.975-2.032v.016a.25.25 0 0 1-.249.25h-2.477a.25.25 0 0 1-.25-.25l.001-.016c.106-1.583.46-2.961.996-3.872.127-.214.272-.408.414-.53a.126.126 0 0 1 .154 0c.142.122.288.316.414.53.536.911.89 2.289.997 3.872" style="fill:#0891b2"/><path d="M23.774 13.333c.09.05.14.149.128.25C23.124 19.459 18.091 24 12.005 24 5.891 24 .84 19.419.098 13.505l-.001-.028a.25.25 0 0 1 .248-.248.24.24 0 0 1 .125.035c.54.312 1.438.835 1.768 1.028a.25.25 0 0 0 .252-.001l1.777-1.044a.25.25 0 0 1 .373.172 7.53 7.53 0 0 0 7.365 6.081 7.53 7.53 0 0 0 7.351-6.007.25.25 0 0 1 .126-.171l2.042-1.103a.25.25 0 0 1 .24.001zM.226 10.667a.25.25 0 0 1-.128-.25C.876 4.541 5.909 0 11.995 0c6.114 0 11.165 4.581 11.907 10.495l.001.028a.25.25 0 0 1-.248.248.24.24 0 0 1-.125-.035 516 516 0 0 1-1.768-1.028.25.25 0 0 0-.252.001l-1.777 1.044a.25.25 0 0 1-.373-.172A7.53 7.53 0 0 0 11.995 4.5a7.53 7.53 0 0 0-7.351 6.007.25.25 0 0 1-.126.171l-2.042 1.103a.25.25 0 0 1-.241-.001z" style="fill:#4d7c0f"/></svg>\n'}
27
+ aria-hidden="true"
28
+ ></fa-icon>
29
+ </div>
30
+ <div style="white-space: pre-wrap; text-align: center">${e}</div>
31
+ </section>
32
+ `:""}}function Tt(){return o(this,void 0,void 0,(function*(){navigator.serviceWorker.controller||(yield new Promise((t=>{navigator.serviceWorker.addEventListener("controllerchange",(()=>{t()}))})))}))}var Ut=e.iN,Mt=e.xm,Ot=e.R8,Nt=e.kS,Ht=e.Yl,Rt=e.Kf,kt=e.Lx,Wt=e.W4,It=e.ap,Lt=e.tf,Dt=e.TV,jt=e.C,zt=e.yv,Bt=e.jH;export{Ut as SWManager,Mt as assertNonNullish,Ot as dateFormatter,Nt as dateTimeFormatter,Ht as digestMessage,Rt as getDateFromTS,kt as getPageDateTS,Wt as getReplayLink,It as getTS,Lt as parseURLSchemeHostPath,Dt as serviceWorkerActivated,jt as sourceToId,zt as timeFormatter,Bt as tsToDate};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "replaywebpage",
3
3
  "productName": "ReplayWeb.page",
4
- "version": "2.3.3",
4
+ "version": "2.3.4",
5
5
  "description": "Serverless Web Archive Replay",
6
6
  "repository": "https://github.com/webrecorder/replayweb.page",
7
7
  "homepage": "https://replayweb.page/",
@@ -13,12 +13,16 @@
13
13
  "default": "./dist/index.js"
14
14
  },
15
15
  "./src/electron-*": "./src/electron-*.ts",
16
- "./index.html": "./index.html"
16
+ "./index.html": "./index.html",
17
+ "./utils": {
18
+ "types": "./dist/types/utils/index.d.ts",
19
+ "default": "./dist/utils.js"
20
+ }
17
21
  },
18
22
  "dependencies": {
19
23
  "@fortawesome/fontawesome-free": "^5.15.4",
20
24
  "@shoelace-style/shoelace": "~2.15.1",
21
- "@webrecorder/wabac": "^2.21.3",
25
+ "@webrecorder/wabac": "^2.22.2",
22
26
  "bulma": "^0.9.3",
23
27
  "electron-log": "^4.4.1",
24
28
  "electron-updater": "^6.3.9",
package/src/index.ts CHANGED
@@ -10,12 +10,15 @@ import { Pages } from "./pages";
10
10
  import { PageEntry } from "./pageentry";
11
11
  import { Replay } from "./replay";
12
12
  import { Sorter } from "./sorter";
13
- import { SWManager } from "./swmanager";
13
+ import { SWManager, serviceWorkerActivated } from "./swmanager";
14
14
  import { URLResources } from "./url-resources";
15
15
  import { Embed } from "./embed";
16
16
  import "./coll-description";
17
17
  import "./shoelace";
18
18
 
19
+ import rwpIcon from "~assets/icons/replaywebpage.svg";
20
+ import rwpLogoAnimated from "~assets/brand/replaywebpage-icon-color-animated.svg";
21
+
19
22
  export {
20
23
  ReplayWebApp,
21
24
  Chooser,
@@ -48,6 +51,9 @@ export {
48
51
  Embed,
49
52
  Embed as ReplayWebPage,
50
53
  SWManager,
54
+ serviceWorkerActivated,
55
+ rwpIcon,
56
+ rwpLogoAnimated,
51
57
  };
52
58
 
53
59
  export type { ItemType, URLResource } from "./types";
@@ -55,3 +61,7 @@ export type { ItemType, URLResource } from "./types";
55
61
  export type { EmbedReplayEvent } from "./item";
56
62
 
57
63
  export * from "./misc";
64
+
65
+ export * from "./pageutils";
66
+
67
+ export * from "./utils/dateTimeFormatter";
package/src/loader.ts CHANGED
@@ -9,6 +9,7 @@ import { parseURLSchemeHostPath } from "./pageutils";
9
9
  import { property } from "lit/decorators.js";
10
10
  import type { LoadInfo } from "./item";
11
11
  import { ifDefined } from "lit/directives/if-defined.js";
12
+ import { serviceWorkerActivated } from "./swmanager";
12
13
 
13
14
  // ===========================================================================
14
15
  /**
@@ -231,14 +232,7 @@ You can select a file to upload from the main page by clicking the 'Choose File.
231
232
  file: source,
232
233
  };
233
234
 
234
- if (!navigator.serviceWorker.controller) {
235
- await new Promise((resolve) => {
236
- navigator.serviceWorker.addEventListener("controllerchange", () =>
237
- // @ts-expect-error - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
238
- resolve(),
239
- );
240
- });
241
- }
235
+ await serviceWorkerActivated();
242
236
 
243
237
  if (this.worker) {
244
238
  if (!this.noWebWorker) {
package/src/misc.ts CHANGED
@@ -216,10 +216,15 @@ export {
216
216
  clickOnSpacebarPress,
217
217
  FaIcon,
218
218
  WrModal,
219
+ /** @deprecated Import this directly from `lit` instead */
219
220
  LitElement,
221
+ /** @deprecated Import this directly from `lit` instead */
220
222
  html,
223
+ /** @deprecated Import this directly from `lit` instead */
221
224
  css,
225
+ /** @deprecated Import this directly from `lit/directives/unsafe-css.js` instead */
222
226
  unsafeCSS,
227
+ /** @deprecated Import this directly from `lit/directives/unsafe-svg.js` instead */
223
228
  unsafeSVG,
224
229
  apiPrefix,
225
230
  replayPrefix,
package/src/swmanager.ts CHANGED
@@ -153,3 +153,15 @@ export class SWManager {
153
153
  `;
154
154
  }
155
155
  }
156
+
157
+ export async function serviceWorkerActivated() {
158
+ if (navigator.serviceWorker.controller) {
159
+ return;
160
+ }
161
+
162
+ await new Promise<void>((resolve) => {
163
+ navigator.serviceWorker.addEventListener("controllerchange", () => {
164
+ resolve();
165
+ });
166
+ });
167
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./dateTimeFormatter";
2
+ export * from "./assertNonNullish";
3
+ export * from "../pageutils";
4
+ export { SWManager, serviceWorkerActivated } from "../swmanager";