1import{t as r,C as d,_ as g,q as c,u as l,I as p,A as u,B as h}from"./main-BauOrmgD.js";import{B as T}from"./BaseComponent.vue_vue_type_script_lang-DSzHjAFJ.js";import"./BaseComponent.utils-ADJOHzt3.js";var E=Object.getOwnPropertyDescriptor,_=(t,e,n,s)=>{for(var i=s>1?void 0:s?E(e,n):e,a=t.length-1,m;a>=0;a--)(m=t[a])&&(i=m(i)||i);return i};let o=class extends T{constructor(){super(...arguments),this.readingTimeEstimation="loading",this.loading=!1}getComponentType(){return""}async contentDidLoad(){super.contentDidLoad(),this.getReadingTimeEstimation()}get wpm(){const e=this.getSettingsAttribute("words_per_minute");return e?parseInt(e,10):225}get staticReadingTime(){return this.getSettingsAttribute("static_reading_time_estimation")}getReadingTimeEstimation(){this.staticReadingTime&&(this.readingTimeEstimation=this.staticReadingTime,this.loading=!1),this.$queueManager.execution.addElement(()=>{this.readingTimeEstimation=this.calculateReadingTimeEstimation(),this.loading=!1})}calculateReadingTimeEstimation(){const e=document.getElementsByClassName("article")[0],n=(e&&e.innerText||"").trim().split(/\s+/).length;return`${Math.ceil(n/this.wpm)} Min.`}};o=_([d],o);const f=r(o),R=["data-component"];function C(t,e,n,s,i,a){return t.contentLoaded?(c(),l("div",{key:0,class:u(["reading-time-estimation",t.layoutComponent.class,{loading:t.loading}]),"data-component":t.componentType},p(t.readingTimeEstimation),11,R)):h("",!0)}const B=g(f,[["render",C]]);export{o as ReadingTimeEstimation,B as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.