(()=>{const e=new WeakMap,t=new WeakSet,a=t=>{const a=e.get(t);if("number"!=typeof a)return;e.delete(t);try{t.currentTime=a}catch{}const d=t.play();d&&"function"==typeof d.catch&&d.catch(()=>{})},d=d=>{const o=d.querySelector(".jetpack-podcast-episode__audio, .jetpack-podcast-episode__video");o&&d.addEventListener("click",d=>{const c=d.target?.closest("button[data-start-time]");if(!c)return;const n=Number(c.dataset.startTime);Number.isNaN(n)||n<0||((d,o)=>{e.set(d,o),d.readyState>=1?a(d):t.has(d)||(t.add(d),d.addEventListener("loadedmetadata",()=>{t.delete(d),a(d)},{once:!0}),d.load())})(o,n)})},o=()=>{document.querySelectorAll(".wp-block-jetpack-podcast-episode").forEach(d)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()})();