(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_Speechify Chrome Extension"]="13.4.1"}catch(l){}})();
import{a as N}from"./chunk-FFEYPAP2.js";import{c as h}from"./chunk-QZO5WHCE.js";import{A as c,J as O,L as m,U as u,gc as t,lc as w,oa as d,yg as o,z as E,zg as l}from"./chunk-XMRXO6YU.js";import{f as s,g as f,i as n,n as p}from"./chunk-CLPINNGF.js";p();f();var C=async()=>{await o("no-client-voices"),await l({duration:0,id:"no-client-voices",priority:151,showOnMobile:!1,timeSensitive:!0,render:()=>n(h,null)}),w("extension_no_client_voices_notification_shown",{action:"open"})};async function k(e=!1){if(!e)return;let a=await m();if(!c(a)){let i=new Date,{lastShownOutOfWords:P}=await new Promise(r=>s.storage.sync.get(["lastShownOutOfWords"],r));P!==i.getDate()&&(o(),l({id:"trial-upgrade",timeSensitive:!0,priority:151,duration:0,showOnMobile:!1,redesigned:!0,render:({dismiss:r})=>n(N,{removeNotification:r})}),s.storage.sync.set({lastShownOutOfWords:i.getDate()}))}O.on("subscriptionupdate",async i=>{i&&c(i)&&o("trial-upgrade")}),await u()||(t.pause(),await C())}t.registerHook("BEFORE_PLAY",async()=>{let e=await m(),a=await d();!E(e)&&a?.premium&&(t.pause(),await u()||await C())});export{k as a};
//# sourceMappingURL=chunk-6U3SPWIY.js.map
