trackkun-dom 1.6.1 → 1.7.0

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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/specs.json +1 -1
package/index.js CHANGED
@@ -1 +1 @@
1
- (function(P,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(P=typeof globalThis<"u"?globalThis:P||self,N(P._trackkun_={}))})(this,function(P){"use strict";function N(a){let e=!1;return new Promise((t,r)=>{Promise.all(a.map(async s=>{const n=await s;!e&&n&&(e=!0,t(n))})).then(()=>{e||t(void 0)})})}function U(a,{removeTrailingSlash:e=!0}={}){if(!a)return;const t=e&&a.endsWith("/")?a.slice(0,-1):a;try{return new URL(t)}catch{return}}function $(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?U(a)?.pathname:a.startsWith("//")?U(`https:${a}`)?.pathname:a}async function B(a,e,t){const r=await t(()=>{a=0});if(r!==void 0)return r;if(!(a<=0))return await new Promise(s=>{setTimeout(async()=>{const n=await B(a-1,e,t);s(n)},e)})}async function M(a,e,t=0){const r=e.root??document.documentElement,s=e.timeoutMs??1e4;return B(e.lazy===!0?s/50:0,50,()=>{const n=e.all===!0?Array.from(r.querySelectorAll(a)):r.querySelector(a)??void 0;return(e.all?!n?.length:!n)?void 0:n})}const Y={text:Te,attr:Pe,"attr-contain":Ne,value:Be,row:Oe,"bg-image":Le};function g(a,e){if(a)return G(a,e,Ce)}function _(a,e){if(a)return G(a,e,Ie)}function G(a,e,t){if(!a)return;const r=a.split("||").map(s=>s.trim()).filter(s=>!!s&&s.includes("|"));for(const s of r){const n=De(s);if(!n)continue;const i=t(e??document.documentElement,n.selector,n.instructions);if(i)return i}}function De(a){const[e,t]=a.split("|");if(!t)return;const r=(t?.startsWith("[")&&t.endsWith("]")?t.substring(1,t.length-1).split(","):[t]).map(s=>{const n=s.indexOf(":"),i=n!==-1;return{extractor:i?s.substring(0,n):s,param:i?s.substring(n+1):""}});return{selector:e||void 0,instructions:r}}function Ce(a,e,t){if(!e)return Q(a,t);const r=e.split(",");for(const s of r){const n=Array.from(a.querySelectorAll(s));for(const i of n){const l=Q(i,t);if(l)return l}}}function Ie(a,e,t){const r=e?Array.from(a.querySelectorAll(e)):[a],s=[];for(const n of r)for(const i of t){const l=Y[i.extractor],o=l(n,i.param);if(o){s.push(o);break}}if(s.length)return s}function Q(a,e){for(const t of e){const r=Y[t.extractor],s=r(a,t.param);if(s)return s}}function Te(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>O(e.textContent)).filter(Boolean).join(" ").trim()||O(a.textContent)}function Pe(a,e){return O(a.getAttribute(e))}function Ne(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(s=>s.includes(e));r&&(t=a.getAttribute(r))}return O(t)}function Be(a){return a.value}function Oe(a,e){if(!e)return;const t=O(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return O(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function Le(a){const e=getComputedStyle(a).backgroundImage;if(!(!e||!e.startsWith("url(")))return e.slice(5,-2)||void 0}function O(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var je=(a=>(a[a.reading=1]="reading",a[a.paused=2]="paused",a[a.plan=3]="plan",a[a.completed=4]="completed",a[a.dropped=5]="dropped",a[a.deleted=6]="deleted",a))(je||{}),_e=(a=>(a[a.ok=1]="ok",a[a.hidden=2]="hidden",a[a.deleted=3]="deleted",a))(_e||{}),ze=(a=>(a[a.aggregator=0]="aggregator",a[a.scanlator=1]="scanlator",a))(ze||{}),Ae=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Ae||{}),q=(a=>(a.id="id",a.name="name",a.slug="slug",a))(q||{}),W=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(W||{});const Ee=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,We=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?|capitolo\.?|capitulo\.?|bölüm\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,ke=/\d+([_-~,.]\d+)?/,Ue=/[_-~,]/;function L(a){if(!a||!a)return;if(!isNaN(+a))return{chap:+a};const e=a.match(Ee),t=e?.[0]?a.replace(e[0],"").trim():a,r=t.match(We),s=t.match(ke),n=r?.[6],i=n??s?.[0];if(!i)return;const l=+i.replace(Ue,".");if(isNaN(l))return;const o=e?.[4];return{vol:o&&!isNaN(+o)&&a.indexOf(e[0])<a.indexOf(n?r[0]:s[0])?+o:void 0,chap:l}}function z(a){return a.sort((e,t)=>e.vol===void 0||t.vol===void 0?t.chap-e.chap:t.vol-e.vol||t.chap-e.chap),qe(a)}function qe(a){const e={};for(let t=a.length-1;t>=0;t--){const r=a[t],s=r.lang??"";r.vol!==void 0?e[s]=r.vol:e[s]!==void 0&&(r.inferVol=e[s])}return a}const Fe=[{seconds:1,locales:{en:"sec",vi:"gi\xE2y",tr:"ikinci",es:"segunda"}},{seconds:60,locales:{en:"min",vi:"ph\xFAt",tr:"dakika"}},{seconds:3600,locales:{en:"hour",vi:"gi\u1EDD",tr:"saat",fr:"heure",it:"ora",es:"hora"}},{seconds:86400,locales:{en:"day",vi:"ng\xE0y",tr:"g\xFCn",fr:"jour",it:"giorno",es:"d\xEDa"}},{seconds:604800,locales:{en:"week",vi:"tu\u1EA7n",tr:"hafta",fr:"semaine",it:"settimana",es:"semana"}},{seconds:2592e3,locales:{en:"month",vi:"th\xE1ng",tr:"ay",fr:"mois",it:"mese",es:"mes"}},{seconds:31536e3,locales:{en:"year",vi:"n\u0103m",tr:"yil",fr:"ann",it:"anno",es:"a\xF1o"}}];function Z(a,e){const t=a?.toLowerCase();if(!t)return;const r=Date.now();if(t.includes("now"))return r;if(t.includes("yesterday"))return r-864e5;const s=new Date(t);if(s instanceof Date){const c=s.valueOf();if(!isNaN(c))return s.getHours()===0&&s.getMinutes()===0?Math.min(r,c+432e5):c}const n=Fe.find(c=>e&&c.locales[e]&&t.indexOf(c.locales[e])!==-1?!0:t.indexOf(c.locales.en)!==-1);if(!n)return;const i=t.split(" ").filter(Boolean),l=K(i)??K(i,["a","an"]);if(!l)return;const o=r-l*n.seconds*1e3;return o>0?o:void 0}function K(a,e){for(let t=0;t<a.length;t++){const r=a[t];if(e?.includes(r))return 1;const s=+r;if(s)return s<0?void 0:s}}function X(a,e=location.origin){if(!a)return;const t=new URL(a.startsWith("//")?`${location.protocol}${a}`:a,location.origin+location.pathname).toString();return t.startsWith(e)?t.replace(e,""):t}function ee(a,{titleSlug:e,titleId:t}){if(!a)return"/";let r=a.replace("{titleSlug}",e);t&&(r=r.replace("{titleId}",t));const s=r.endsWith("/")?r:r+"/";return s.startsWith("/")?s:"/"+s}function Ve(a,e){const t=[...e],r=[];let s=!1,n=0;const i=Math.min(a.length,100);for(let o=0;o<i;o++){if(n>=10/2){const p=10-r.length;if(p>0){const y=o+p<=a.length?a.slice(o,o+p):t.slice(0,p);r.push(...y)}break}const c=a[o],u=c.id!==void 0,h=t.findIndex(p=>u&&p.id===c.id||p.slug===c.slug||p.name==c.name),d=h===-1?void 0:t.splice(h,1)[0];!d||d.chapters[0]?.chap!==c.chapters[0]?.chap?(s=!0,r.push({...c,changed:!0})):(n++,r.push(c))}if(!s)return{hasMore:!1,rawReleases:[]};if(r.length<=10)return{hasMore:!!a[a.length-1]?.changed,rawReleases:r};const l=[];for(let o=0;o<r.length;o++){const c=r[o];(c.changed||o<10)&&l.push(c)}return{hasMore:e.length<2||e.length-t.length<2,rawReleases:l}}function He(a,e){const t={};return a.forEach(r=>{const s=r.chapters.reduce((n,i)=>{const l=i.lang||e||"";return n[l]||(n[l]=[]),n[l].push(i),n},{});Object.entries(s).forEach(([n,i])=>{const l=`${r.slug}:${n}`;t[l]?(t[l].chapters.push(...i),z(t[l].chapters)):t[l]={...r,lang:n===""?void 0:n,chapters:i}})}),Object.values(t)}var R=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))(R||{}),Je=Object.defineProperty,Ye=(a,e,t)=>e in a?Je(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,D=(a,e,t)=>(Ye(a,typeof e!="symbol"?e+"":e,t),t);class k{constructor(e){D(this,"spec"),D(this,"siteMeta"),D(this,"tags"),D(this,"context"),D(this,"methodsMap",{[R.title]:()=>this.getRawTitleData(),[R.reader]:()=>this.getRawReaderData(),[R.releases]:()=>this.getRawReleasesData(),[R.search]:()=>this.getRawSearchData(),[R.chapters]:()=>this.getRawChaptersData()}),D(this,"normalizedTagsMap"),this.spec=e.spec,this.siteMeta=e.siteMeta,this.tags=e.tags,this.context=e.context}async getRawSearchData(){throw new Error("Unimplemented")}async getRawPageByType(e,t=!1){const r=await this.methodsMap[e](),s=!r&&Qe(this.spec);if(t&&!r&&!s)return;const n=location.origin+location.pathname;return{type:e,is404:s,specId:this.spec.id,siteName:g(this.spec.name),url:n,data:r,spec:this.spec,context:this.context}}parseReaderSlug(e,t,r){let s=t;if(s[0]!=="/"&&s.includes("/"))try{s=new URL(t,location.href).pathname}catch{}const n=s.endsWith("/")?s.slice(0,-1):s;if(e.includes("{")){const i=e.split("/").filter(Boolean),l=n.split("/").filter(Boolean);if(i.length<l.length){const o=l[i.indexOf("{lang}")],c=l[i.indexOf("{titleId}")],u=l[i.indexOf("{titleSlug}")],h=e.replace("{lang}",o).replace("{titleId}",c).replace("{titleSlug}",u);if(n.startsWith(h))return{basePath:h,lang:o.toLowerCase(),titleId:c,titleSlug:u,slug:n.replace(h,"")}}}else if(n.startsWith(e))return{basePath:e,slug:n.replace(e,"")};return{basePath:"",slug:n[0]==="/"?n.substring(1):n}}parseTitleSlug(e){if(typeof e!="string")return{};const t=$(e),r=t?.split("/").filter(Boolean);if(!r?.length)return{};const s=this.siteMeta.titleBase.split("/").filter(Boolean),n=s.indexOf("{slug}");return(n===-1?r.length-s.length>=1:r.length===s.length)?{id:r[s.indexOf("{id}")],slug:n===-1?r.slice(s.length).join("/"):r[n]}:{slug:t}}finalizeRawReleasesData(e){const t=this.spec.releases?.title?.lang?this.siteMeta.defaultLang:void 0,r=He(e.rawReleases,t);if(r.length)return this.context?.oldRawReleases?Ve(r,this.context.oldRawReleases):{rawReleases:r,hasMore:!0}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=Ge(this.tags)),r=e.map(s=>t[F(s)]).filter(Boolean);return r.length===0?void 0:Array.from(new Set(r)).sort((s,n)=>s-n)}}D(k,"specId"),D(k,"siteId");function Ge(a){const e={};return a.forEach(({id:t,name:r,altNames:s})=>{e[F(r)]=t,s&&s.forEach(n=>{e[F(n)]=t})}),e}function F(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}function Qe(a){return a[404]&&document.querySelector(a[404])?!0:document.title.toLowerCase().includes("not found")}class w extends k{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await M(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const s=r.slice(0,100).map(i=>{const l=g(t.url,i),o=$(l),c=g(t.name,i),u=g(t.at,i);if(!(!o||!c))return{titleEl:i,id:g(t.id,i),path:o,name:c,lang:g(t.lang,i)?.toLowerCase(),at:Z(u,this.siteMeta.defaultLang)}}).filter(Boolean);if(!s.length)return;const n=[];return await Promise.all(s.map(async i=>{const{path:l,titleEl:o,lang:c,at:u,...h}=i,{id:d,slug:p}=this.parseTitleSlug(l);if(!p)return;const y=h.id||d,v=await this.getChapters(e,{root:o,titleId:y,titleSlug:p})??[];v.length&&n.push({slug:p,chapters:c||u?v.map(f=>({...f,elIndex:void 0,lang:f.lang??c,ts:f.ts??u})):v,...h,id:y})})),this.finalizeRawReleasesData({rawReleases:n})}getRawTitleData(){return this.getTitleData(this.spec.title)}async getTitleData(e){if(!e||(e.sel||e.lazy)&&!await M(e.sel??e.name,{lazy:!!e.lazy}))return;const t=g(e.name);if(!t)return;const{id:r,slug:s}=this.parseTitleSlug(location.pathname);if(!s)return;let n=_(e.tags)??[];n.length===1&&(n=n[0].split(",").map(u=>u.trim()).filter(Boolean));const i=g(e.type),l=_(e.langs)?.map(u=>u.toLowerCase()),o=r||g(e.id),c=await this.getChapters(e.chapter,{lazy:!0,titleId:o,titleSlug:s})??[];return{id:o||g(e.id),url:location.origin+location.pathname,slug:s,name:t,langs:l?.length?l:e.langs&&this.siteMeta.defaultLang?[this.siteMeta.defaultLang]:void 0,tags:this.getTagIdsFromNames([...n??[],...i?[i]:[]]),chapters:c,img:e.img?await this.getValidImgSrc(e.img):void 0,firstUrl:this.getFirstChapterUrl()}}getFirstChapterUrl(){const e=g(this.spec.title?.first);if(e){if(e.startsWith("http"))return e;try{return new URL(e,location.href).href}catch{return}}}getValidImgSrc(e){return B(33,30,()=>{const t=g(e);return t&&!t.startsWith("data:")?t.split(" ")[0]:void 0})}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await w.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await w.verifyImgsCotainer(r)))return;const s=e.reader.title,n=document.querySelector(s.sel);if(!n)return;const i=g(s.name,n),l=g(s.url,n),{slug:o,id:c}=this.parseTitleSlug(l),u=g(s.img,n);if(!i||!l||!o)return;const h=c||g(s.id),d=!!this.context?.disableLazyChapters,p=!!this.context?.includeHiddenChapters,y=await this.getChapters(e.reader?.chapter,{titleId:h,titleSlug:o,lazy:p||!d,includeHiddenChapters:p,timeoutMs:p?3e3:12e4})??[],v=g(e.reader.label)?.toLowerCase().replace(i.toLowerCase(),"");if(!v)return;const{vol:f,chap:x=0}=L(v)||{},{slug:m,basePath:S,lang:I,titleId:A}=this.parseReaderSlug(ee(t.readerBase,{titleId:h,titleSlug:o}),location.pathname,location.href);return this.finalizeRawReaderData({vol:f,chap:x,lang:I??g(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0),slug:m,basePath:S,imgs:r?void 0:_(e.reader.imgs),title:{id:h||A||g(s.id),url:l,slug:o,name:i,langs:I?[I]:void 0,img:X(u),chapters:y,hasMoreChapters:d&&!y.length&&!!e.reader?.chapter&&!e.reader?.chapter.trigger}},{prevSlug:this.findNeighborChapter({sel:e.reader.prev,basePath:S}),nextSlug:this.findNeighborChapter({sel:e.reader.next,basePath:S})})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===W.blank)return;const t=e===W.reader,r=e===W.title,s=t?(await this.getRawReaderData())?.title:r?await this.getRawTitleData():void 0;let n=s?.chapters;if(!t&&!r&&(n=await this.getChapters(this.spec.chapters?.chapter,{lazy:this.spec.chapters?.lazy})),!n)return;const i=this.context?.lang,l=i?n.filter(o=>!o.lang||o.lang===i):n;return{chapters:l,title:s?{...s,chapters:[]}:await this.getTitleData(this.spec.chapters?.title),hasMore:!1,asc:!1,total:l.length}}async getRawSearchData(){const e=this.spec.search?.title;if(!e)return;const{chapter:t}=e,r=[];return await Promise.all(Array.from(document.querySelectorAll(e.sel)).map(async s=>{const n=g(e.url,s),i=$(n),l=g(e.name,s),{slug:o,id:c}=this.parseTitleSlug(i);!i||!l||!o||r.push({id:c,slug:o,name:l,chapters:await this.getChapters(t,{root:s,titleId:c,titleSlug:o})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t=document.documentElement,titleId:r="",titleSlug:s="",includeHiddenChapters:n=!1,lazy:i=!0,timeoutMs:l}){if(!e)return;let o=null;if(e.trigger){if(!n||(o=document.querySelector(e.trigger),!o))return;o.click()}const c=[],u=await M(e.sel,{root:t,all:!0,lazy:i,timeoutMs:l});if(!u?.length)return o?.click(),[];const h=(u??[]).map((f,x)=>({id:g(e.id,f),label:g(e.label,f),url:g(e.url,f),at:g(e.at,f),elIndex:x}));o?.click();const d=h.map(({label:f})=>L(f)),p=d[1]?.chap;!d[0]&&(p===void 0||p<=1)&&(d[0]={chap:0});const{readerBase:y}=this.siteMeta,v=ee(y,{titleId:r,titleSlug:s});return d.forEach((f,x)=>{if(!f)return;const{id:m,url:S,at:I,elIndex:A}=h[x],E={...f,id:m,elIndex:A,ts:Z(I,this.siteMeta.defaultLang)},b=S?.startsWith("http")&&!S.includes(`//${location.hostname}/`),J=b?S:$(S);if(!J){c.push(E);return}if(b){c.push({...E,slug:J});return}const{slug:ta,lang:aa}=this.parseReaderSlug(v,J,S);c.push({...E,slug:ta,lang:aa})}),z(c)}static async isReaderPage(e){return!!e.sel&&!!await M(e.sel,{lazy:!!e.lazy})}static async verifyImgsCotainer(e){const t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>`${r} img, ${r} canvas`).join(",");return!!await M(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=g(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const s=$(r);if(s)return this.parseReaderSlug(t,s,r).slug}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const s=e.title?.chapters;if(!s?.length){const c=L(t),u=L(r);return!c&&!u?e:{...e,prev:c?{...c,slug:t}:void 0,next:u?{...u,slug:r}:void 0}}let n,i,l,o;for(let c=0;c<s.length&&!(n&&(!t||l)&&!r&&o);c++){const u=s[c];!n&&(e.slug==u.slug||e.chap===u.chap&&(e.vol===u.vol||e.vol===void 0))?(n=u,i=c):!l&&t===u.slug?l=u:!o&&r===u.slug&&(o=u)}return i!==void 0&&(l??(l=s[i+1]),o??(o=s[i-1])),{...e,inferVol:n?.inferVol,prev:l,next:o}}}var Ze=Object.defineProperty,Ke=(a,e,t)=>e in a?Ze(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Xe=(a,e,t)=>(Ke(a,typeof e!="symbol"?e+"":e,t),t);class te extends w{parseTitleSlug(e){return{slug:$(e)?.split("/").filter(Boolean)[1]}}}Xe(te,"specId","bato");function et(){return Math.random().toString(16).slice(2)}async function tt({addListener:a,removeListener:e,transform:t,filter:r,handler:s,onTimeout:n,timeout:i,once:l}){return new Promise(o=>{a(h);const c=()=>l===!0&&e(h),u=i?setTimeout(()=>{c(),o(void 0),n?.()},i):void 0;async function h(d,...p){d=t?t(d):d,d!==void 0&&(!r||r(d,...p))&&(c(),o(d),s?.(d,...p),u&&clearTimeout(u))}})}async function at(a){return(await tt({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function rt(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:s,args:n}=a,i={reqId:et(),event:s,args:n};return(e||window)?.postMessage(i,r??"*"),(await at({filter:l=>l?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const j={isAny:!0};function T(a,...e){return rt({event:"tk:fetchResult",args:{baseUrl:a,segments:e}})}var st=Object.defineProperty,nt=(a,e,t)=>e in a?st(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,it=(a,e,t)=>(nt(a,typeof e!="symbol"?e+"":e,t),t);const ae=class Me extends w{async getRawReleasesData(){let e;try{const r=Array.from({length:2},async(s,n)=>{const i=`https://api.${location.host}/chapter?accept_erotic_content=true&page=${n+1}&order=new`;return(await fetch(i)).json()});e=(await Promise.all(r)).flat()}catch{return}const t=[];return e.forEach(r=>{const{vol:s,chap:n,hid:i,lang:l,updated_at:o,md_comics:c}=r,u=typeof n=="string"&&!isNaN(+n)?+n:void 0;typeof u=="number"&&t.push({id:c.hid,slug:c.slug,name:c.title,chapters:[{slug:i,vol:typeof s=="string"&&!isNaN(+s)?+s:void 0,chap:u,lang:l,ts:new Date(o).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await T(`https://api.${location.host}`,"comic",j,"chapters");if(!t)return e;const r=t.url.split("/").filter(Boolean).slice(-2)[0],s=re(t.value),n=g("h1 ~ div.text-sm span:first-child|row:demographic"),i=n?this.getTagIdsFromNames([n])?.[0]:void 0;return i&&!e.tags?.includes(i)&&(e.tags?.push(i),e.tags?.sort((l,o)=>l-o)),{...e,img:e.img??X(g(this.spec.title?.img)),id:r,hasMoreChapters:s?.hasMore??!1,chapters:s?.chapters??[]}}async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,lang:e.lang&&e.lang?.length<=6?e.lang:Me.getLangFromReaderSlug(e.slug)||e.lang}}static getLangFromReaderSlug(e){const t=e.split("-");let r;for(let s=t.length-1;s>0;s--){const n=t[s];if(!isNaN(+n))break;r=r?`${n}-${r}`:n}return r&&r.length<=6?r:void 0}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e,lang:t="en",skip:r}=this.context,s=r?Math.floor(r/1e3)+1:void 0;try{const n=await fetch(`https://api.${location.host}/comic/${e}/chapters?lang=${t}&limit=1000${s&&s>1?`&page=${s}`:""}`),i=re(await n.json());return i?{...i,lang:t,asc:!1}:void 0}catch{return}}};it(ae,"specId","comick");let lt=ae;function re(a){if(!Array.isArray(a?.chapters))return;const e=[];return a.chapters.forEach(t=>{const{vol:r,chap:s,hid:n,lang:i,updated_at:l}=t,o=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof o!="number"||e.some(c=>c.vol==r&&c.chap===o&&c.lang===i)||e.push({slug:n,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:o,lang:i,ts:new Date(l).valueOf()})}),{chapters:z(e),total:a.total??e.length,hasMore:a.total>a.limit}}function se(a,e){const t=a[0]===e?a.substring(1):a;return t[t.length-1]===e?t.substring(0,t.length-1):t}var ot=Object.defineProperty,ct=(a,e,t)=>e in a?ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ut=(a,e,t)=>(ct(a,typeof e!="symbol"?e+"":e,t),t);class V extends w{async getRawReleasesData(){const e=this.detectNewSiteMeta(this.spec.releases,this.siteMeta);this.siteMeta=e??this.siteMeta;const t=await super.getRawReleasesData();if(t)return{...t,siteMeta:e}}async getRawTitleData(){const e=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(location.pathname)});this.siteMeta=e??this.siteMeta;const t=await super.getRawTitleData();if(t)return{...t,siteMeta:e}}async getRawReaderData(){const e=ne(this.spec.reader?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath($(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawReaderData();if(r)return{...r,siteMeta:t}}async getRawSearchData(){const e=ne(this.spec.search?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath($(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawSearchData();if(r)return{...r,siteMeta:t}}detectNewSiteMeta(e,t){if(!e)return;const r=e.title,s=document.querySelector(r.sel)??void 0;if(!s)return;const n=$(g(r.url,s));if(n!==void 0)return this.finalizeNewSiteMeta(t,{titleBase:this.extractBasePath(n)})}finalizeNewSiteMeta(e,{titleBase:t}){if(e.titleBase!==t)return{...e,titleBase:t,readerBase:e.readerBase.replace(e.titleBase,t)}}extractBasePath(e){return se(e,"/").split("/").slice(0,-1).join("/")}}ut(V,"specId","madara");function ne(a){if(!a)return;const e=document.querySelector(a.sel);return g(a.url,e)}var gt=Object.defineProperty,pt=(a,e,t)=>e in a?gt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ht=(a,e,t)=>(pt(a,typeof e!="symbol"?e+"":e,t),t);class ie extends w{async getRawReleasesData(){const e=await this.getVM();if(!e)return super.getRawReleasesData();const t=e.LatestJSON.slice(0,100).map(r=>{const s=r.IndexName;return{slug:s,name:r.SeriesName,chapters:[H(r,s)]}});return this.finalizeRawReleasesData({rawReleases:t})}parseTitleSlug(e){const{slug:t}=super.parseTitleSlug(e);return!t||t.includes("{")?{}:{slug:t}}async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:le(await this.getVM(),e.slug),hasMoreChapters:!1}}parseReaderSlug(e,t){const{slug:r,basePath:s}=super.parseReaderSlug(e,t);return{slug:r.replace(/-page-\d{1,3}\.html\/?$/,".html"),basePath:s}}async getRawReaderData(){const e=await this.getVM();if(!e)return;const t=document.querySelector(".ImageGallery img.img-fluid")?.getAttribute("ng-src"),r=e.IndexName,s=H(e.CurChapter,r);return this.finalizeRawReaderData({chap:s.chap,slug:s.slug,imgs:ft(e,t??void 0),basePath:"/"+this.siteMeta.readerBase.replace("{titleSlug}",r)+"/",title:{name:e.SeriesName,slug:r,url:`/${this.siteMeta.titleBase}/${r}`,chapters:le(e,r),hasMoreChapters:!1}})}getVM(){return B(50,100,()=>window.angular?.element?.(document.documentElement)?.scope()?.vm)}}ht(ie,"specId","manga4life");function le(a,e){return(a?.Chapters??a?.CHAPTERS??[]).sort((t,r)=>r.Chapter-t.Chapter).map(t=>H(t,e))}function H(a,e){const t=+a.Chapter[0],r=+a.Chapter.substring(1)/10;return{slug:`${e}-chapter-${r}${t&&t>1?`-index-${t}`:""}.html`,chap:r,ts:dt(a.Date)}}function dt(a){const e=new Date(a).valueOf();return e===e?e:void 0}function ft(a,e){let t=e?.split(".").slice(-1)[0]??"png";t=t.length>=3&&t.length<=4?t:"png";try{const r=a.CurChapter.Chapter.slice(1,-1),s=a.CurChapter.Chapter[a.CurChapter.Chapter.length-1],n=s!=="0"?`${r}.${s}`:r,i=`https://${a.CurPathName}/manga/${a.IndexName}/${a.CurChapter.Directory?`${a.CurChapter.Directory}/`:""}${n}-`;return a.Pages.map(l=>{const o=(l+"").padStart(3,"0");return`${i}${o}.${t}`})}catch{return}}var mt=Object.defineProperty,wt=(a,e,t)=>e in a?mt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,yt=(a,e,t)=>(wt(a,typeof e!="symbol"?e+"":e,t),t);const vt={a:.1,b:.2,c:.3,d:.4};class oe extends k{parseTitleSlug(e){return{slug:$(e)?.split("/").filter(Boolean)[1]}}async getRawReleasesData(){let e=[];try{e=(await(await fetch("https://api.mangadex.org/chapter?limit=96&offset=0&includes[]=manga&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&order[readableAt]=desc")).json()).data}catch{return}const t=[];return e.forEach(({relationships:r,attributes:s,id:n})=>{const i=r.find(({type:c})=>c==="manga"),l=C(s.volume),o=C(s.chapter);o!==void 0&&t.push({slug:i.id,name:Object.values(i.attributes.title)[0],chapters:[{slug:s.externalUrl||n,vol:l,chap:o,lang:s.translatedLanguage,ts:new Date(s.readableAt).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e="https://api.mangadex.org/manga/",[t,r]=await Promise.all([T(e,j),T(e,j,"feed")]);if(!t||!r)return;const s=r.value.data?.map?.(l=>{const{attributes:o,id:c}=l;if(typeof o!="object"||typeof c!="string"||!c)return;const{externalUrl:u,title:h,volume:d,chapter:p,translatedLanguage:y}=o;return{slug:u||c,label:h||void 0,vol:C(d),chap:C(p),lang:y||"en",ts:new Date(o.readableAt).valueOf()}}).filter(l=>l?.chap!=null)??[],{data:n}=t.value;if(!n)return;const i=ue({data:n,getTagIdsFromNames:l=>this.getTagIdsFromNames(l)});if(i)return{...i,chapters:z(s),hasMoreChapters:(r.value.total||0)>(r.value.limit||0)}}async getRawReaderData(){const e="https://api.mangadex.org/",[t,r,s]=await Promise.all([T(e,"chapter",j),T(e,"at-home","server",j),T(e,"manga",j,"aggregate")]);if(!t||!r||!s)return;const n=t.value.data,{volume:i,chapter:l,externalUrl:o,translatedLanguage:c}=n.attributes||{},{baseUrl:u,chapter:{data:h,dataSaver:d,hash:p}}=r.value,y=n.relationships?.find?.(b=>b.type==="manga");if(!y)return;const v=ue({data:y,getTagIdsFromNames:b=>this.getTagIdsFromNames(b)});if(!v||typeof s.value.volumes!="object")return;const f=ce(s.value)??[];(typeof l!="string"||l==="none")&&!f.length&&f.push({chap:0,slug:n.id});const x=f.findIndex(b=>b.slug===n.id),m=n.relationships?.find?.(b=>b.type==="scanlation_group"),S=u.endsWith("/")?u:u+"/",I=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),A=`${S}${I?"data-saver":"data"}/`,E=((I?d:h)??[]).map?.(b=>`${A}${p}/${b}`)??[];return{externalUrl:o,vol:C(i),inferVol:f[x]?.inferVol,chap:C(l)||0,imgs:E,lang:c,slug:n.id,prev:f[x+1],next:f[x-1],basePath:"/chapter/",groupName:m?.attributes?.name,groupUrl:m?.attributes?.website,isWebtoon:y?.attributes?.tags?.some(b=>b.attributes.name.en==="Long Strip"),title:{...v,chapters:f}}}async getRawChaptersData(){if(!this.context)return;const{titleSlug:e,lang:t="en"}=this.context;let r;try{const s=await fetch(`https://api.mangadex.org/manga/${e}/aggregate?translatedLanguage[]=${t}`);r=ce(await s.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}yt(oe,"specId","mangadex");function C(a){if(typeof a!="string"||a==="none")return;const e=parseFloat(a);if(e!==e)return;const t=a[a.length-1];return e+(vt[t]??0)}function ce(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const s=C(t);return Object.values(r).map(({id:n,chapter:i})=>{const l=C(i);if(l!==void 0)return{vol:s,chap:l,slug:n}})}).flat().filter(Boolean).reverse();return z(e)}function ue({data:a,getTagIdsFromNames:e}){const{id:t,attributes:r,relationships:s}=a;if(!t||typeof t!="string"||typeof r!="object")return;const{title:n,availableTranslatedLanguages:i,altTitles:l,tags:o,contentRating:c}=r;if(typeof n!="object"||i&&!Array.isArray(i))return;const u=Object.values(n)[0];if(!u||typeof u!="string")return;const h=bt(),d=(i??[])?.map?.(m=>typeof m=="string"?m:void 0).filter(Boolean)??[],p=d.filter(m=>m&&(!h||h.includes(m))),y=l?.map?.(m=>{const[[,S]=[]]=Object.entries(m);return S}),v=s?.find?.(m=>m.type==="cover_art")?.attributes?.fileName,f=v?`https://uploads.mangadex.org/covers/${t}/${v}.256.jpg`:void 0,x=(o||[]).map(m=>m?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:y,langs:p.length>0?p:d.length>0?d:["en"],img:f,tags:e(x)}}function bt(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var Rt=Object.defineProperty,St=(a,e,t)=>e in a?Rt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,$t=(a,e,t)=>(St(a,typeof e!="symbol"?e+"":e,t),t);class ge extends w{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.id?.split("?")[0]}))}}async getRawReaderData(){if((await M(".current-viewtype",{lazy:!0,all:!1}))?.textContent?.trim().toLowerCase()!=="volume")return await super.getRawReaderData()}async getRawChaptersData(){const e=this.context?.lang;if(!e)return;const t=await M(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await M(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}$t(ge,"specId","mangafire");var xt=Object.defineProperty,Mt=(a,e,t)=>e in a?xt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Dt=(a,e,t)=>(Mt(a,typeof e!="symbol"?e+"":e,t),t);class pe extends w{async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,imgs:await this.getImgs()}}parseReaderSlug(e,t){const{slug:r,basePath:s}=super.parseReaderSlug(e,t),n=r.split("/").filter(Boolean),i=n[n.length-1];return{basePath:s,slug:i.startsWith("pg-")?n.slice(0,-1).join("/"):r}}async getImgs(){const e=await B(100,20,()=>window.imgsrcs),t=window.CryptoJS,r=t.enc.Hex.parse("e11adc3949ba59abbe56e057f20f883e"),s={iv:t.enc.Hex.parse("1234567890abcdef1234567890abcdef"),padding:t.pad.ZeroPadding};return t.AES.decrypt(e,r,s).toString(t.enc.Utf8).split(",")}}Dt(pe,"specId","mangago");var Ct=Object.defineProperty,It=(a,e,t)=>e in a?Ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Tt=(a,e,t)=>(It(a,typeof e!="symbol"?e+"":e,t),t);class he extends w{async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:e.chapters.map(t=>({...t,slug:t.slug?.split("/").filter(Boolean).slice(-1)[0]}))}}}Tt(he,"specId","mangaplus");var Pt=Object.defineProperty,Nt=(a,e,t)=>e in a?Pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Bt=(a,e,t)=>(Nt(a,typeof e!="symbol"?e+"":e,t),t);class de extends w{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.slug.substring(t.slug.lastIndexOf("-")+1)||void 0}))}}}Bt(de,"specId","mangareader");var Ot=Object.defineProperty,Lt=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,jt=(a,e,t)=>(Lt(a,typeof e!="symbol"?e+"":e,t),t);class fe extends V{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,id:await this.getReaderTitleId()}}}async getReaderTitleId(){const e=await window.HISTORY?.getStored?.();if(!e||typeof e!="object")return;const t=Object.values(e).filter(Boolean);if(!t.length)return;t.sort((s,n)=>n.time-s.time);const r=t[0].manga_ID;return typeof r=="string"?r:typeof r=="number"?r+"":void 0}detectNewSiteMeta(e,t){if(!e)return;const r={...t,releases:se(location.pathname,"/")},s=e.title,n=document.querySelector(s.sel)??void 0;if(!n)return;const i=$(g(s.url,n));if(i===void 0)return;const l=n.querySelector(s.chapter.sel)??void 0;if(!(!l||$(g(s.chapter.url,l))===void 0))return r.titleBase=this.extractBasePath(i),t.titleIdType===q.id&&(g(s.id,n)||(t.titleIdType=q.name)),this.finalizeNewSiteMeta(t,r)}finalizeNewSiteMeta(e,t){const r=Object.keys(t),s={...e};let n=!1;return r.forEach(i=>{const l=t[i];l!==e[i]&&(s[i]=l,n=!0)}),n?s:void 0}}jt(fe,"specId","mangastream");var _t=Object.defineProperty,zt=(a,e,t)=>e in a?_t(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,At=(a,e,t)=>(zt(a,typeof e!="symbol"?e+"":e,t),t);class me extends w{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,name:e.title.name.replace("Ritorna a","").trim()}}}}At(me,"specId","mangaworld");var Et=Object.defineProperty,Wt=(a,e,t)=>e in a?Et(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,kt=(a,e,t)=>(Wt(a,typeof e!="symbol"?e+"":e,t),t);class we extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(e)return{...e,hasMoreChapters:e.chapters.length===50}}}kt(we,"specId","mgeko");var Ut=Object.defineProperty,qt=(a,e,t)=>e in a?Ut(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ft=(a,e,t)=>(qt(a,typeof e!="symbol"?e+"":e,t),t);class ye extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await T(`https://api.${location.host}`,"chapter","query");if(!t)return;let r;try{r=new URL(t.url).searchParams.get("series_id")}catch{return}if(!r)return;const{first_page:s,last_page:n}=t.value.meta||{};return{...e,id:r,hasMoreChapters:s!==n}}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e}=this.context;try{const t=await(await fetch(`https://api.${location.host}/chapter/query?page=1&perPage=1000&query=&order=desc&series_id=${e}`)).json();if(!t?.data?.map)return;const r=[];return t.data.forEach(s=>{const{chapter_name:n,chapter_slug:i,created_at:l}=s;if(typeof n!="string"||typeof i!="string")return;const o=L(n);if(o?.chap)return{...o,slug:i,ts:l&&new Date(l).valueOf()||void 0}}),{chapters:r,hasMore:!1,asc:!1}}catch{return}}}Ft(ye,"specId","reaper");var Vt=Object.defineProperty,Ht=(a,e,t)=>e in a?Vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Jt=(a,e,t)=>(Ht(a,typeof e!="symbol"?e+"":e,t),t);class ve extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=_(".info-detail__row > .genre-btn,.info__right .stats__row:first-child|text")?.map(r=>[r,...r.split(" ")]).flat();return be({...e,tags:this.getTagIdsFromNames(t)??[]},".episode-header .episode-cnt")}async getRawReaderData(){const e=await super.getRawReaderData();if(!e)return;const t=`${location.origin}/series/${e.title.slug}/info`;return{...e,title:{...be({...e.title,url:t,tags:[]},".episode-list .js-ep-cnt"),hasMoreChapters:!1}}}async getRawChaptersData(){if(!this.context)return;const{rawId:e,skip:t}=this.context,r=1e3,s=t?Math.floor(t/1e3)+1:1;try{const n=await fetch(`/series/${e}/episodes?page=${s}&sort=NEWEST&max_limit=${r}`);return Yt(await n.json())}catch{return}}parseTitleSlug(e){if(!e)return{};const t=e.split("/").filter(Boolean);return{slug:t[1]??t[0]}}}Jt(ve,"specId","tapas");function be(a,e){const t=Gt(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function Yt(a){const e=a?.data?.episodes;if(!Array.isArray(e))return;const t=e.map(s=>({chap:s.pending_scene??s.scene,slug:s.id+"",ts:new Date(s.publish_date)?.valueOf?.()||void 0})),r=a?.data?.pagination;return{chapters:t,total:r?.total??t.length,hasMore:!!r?.has_next}}function Gt(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var Qt=Object.defineProperty,Zt=(a,e,t)=>e in a?Qt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Kt=(a,e,t)=>(Zt(a,typeof e!="symbol"?e+"":e,t),t);class Re extends w{async getRawTitleData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(t||!r)return;const s=await super.getRawTitleData();if(!s)return;const n=location.pathname.split("/")[1];return{...s,slug:`${s.slug}?title_no=${r}`,id:r,langs:[n].filter(Boolean),chapters:s.chapters.map(i=>({...i,lang:n})),hasMoreChapters:(document.querySelector(".paginate")?.childElementCount??1)>1}}async getRawReaderData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(!t||!r)return;const s=L(g(".paginate > span:not(:first-child)|text"));if(s===void 0)return;const{chap:n}=s,i=document.title.split("|")[1]?.trim();if(!i)return;const l=location.pathname.split("/"),o=`${l.slice(0,4).join("/")}/list?title_no=${r}`,c=await this.getChapters({sel:"#sequence_scroll li.eg-flick-panel,#toolbar .episode_lst li[data-episode-no]",url:"a|attr:href",label:"|attr:data-episode-no || .num|text"},{lazy:!1,titleId:r,titleSlug:o}),u=l[1];return{chap:n,lang:u,slug:`${location.pathname}?title_no=${r}&episode_no=${t}`,basePath:"",imgs:await this.getReaderImgs(),isWebtoon:!0,title:{id:r,url:o,slug:o,name:i,langs:[u],chapters:(c??[]).map(h=>({...h,lang:u})),hasMoreChapters:!1}}}async getReaderImgs(){const e=_("#_imageList img|[attr:data-url,attr:src]");return e?.length?e:await B(100,50,()=>window.__viewerState__?.scrollViewerParam?.imageList?.map(({url:t})=>t).filter(Boolean))}parseReaderSlug(e,t,r){if(!r)return{basePath:"",slug:t};if(r.startsWith("http://")||r.startsWith("https://")){const s=U(r);return{basePath:"",slug:s.pathname+s.search}}return{basePath:"",slug:r}}}Kt(Re,"specId","webtoon");const Xt=[te,lt,V,ie,oe,ge,pe,he,de,fe,me,we,ye,ve,Re];function Se(a){const e=Xt.find(t=>t.specId===a.spec.id)??w;return new e(a)}async function ea(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:$e(t,e.generic);if(!r.length)return;const s=Se({...a,spec:e,siteMeta:t});return await N(r.map(n=>s.getRawPageByType(n,r.length>1)))}return await N((a.genericSpecs??[]).map(t=>{const r=$e(t.meta,t.generic);if(!r.length)return[];const s=Se({...a,spec:t,siteMeta:t.meta});return r.map(n=>s.getRawPageByType(n,!0))}).flat())}function $e(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,s=location.pathname.split("/").filter(Boolean),n=xe(s,r),i=xe(s,t);if(n&&i)return[R.reader,R.title];const l=[];return n!==!1&&!i&&l.push(R.reader),i!==!1&&!n&&l.push(R.title),!l.length&&e?[R.reader,R.title]:l}function xe(a,e){if(!e)return;const t=e.split("/").filter(Boolean),r=t.indexOf("{slug}"),s=r===t.length-1,n=!s&&r!==-1;if(s&&(t.pop(),!t.length))return;const i=a.length-t.length;if(n?i<0:i<=0)return!1;let l=!1;for(let o=0;o<t.length;o++){const c=t[o];if(c[0]!=="{"){if(c!==a[o])return!1;l=!0}}if(l&&i===(n?0:1))return!0}P.PageType=R,P.scrape=ea});
1
+ (function(P,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(P=typeof globalThis<"u"?globalThis:P||self,N(P._trackkun_={}))})(this,function(P){"use strict";function N(a){let e=!1;return new Promise((t,r)=>{Promise.all(a.map(async s=>{const n=await s;!e&&n&&(e=!0,t(n))})).then(()=>{e||t(void 0)})})}function U(a,{removeTrailingSlash:e=!0}={}){if(!a)return;const t=e&&a.endsWith("/")?a.slice(0,-1):a;try{return new URL(t)}catch{return}}function $(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?U(a)?.pathname:a.startsWith("//")?U(`https:${a}`)?.pathname:a}async function B(a,e,t){const r=await t(()=>{a=0});if(r!==void 0)return r;if(!(a<=0))return await new Promise(s=>{setTimeout(async()=>{const n=await B(a-1,e,t);s(n)},e)})}async function M(a,e,t=0){const r=e.root??document.documentElement,s=e.timeoutMs??1e4;return B(e.lazy===!0?s/50:0,50,()=>{const n=e.all===!0?Array.from(r.querySelectorAll(a)):r.querySelector(a)??void 0;return(e.all?!n?.length:!n)?void 0:n})}const Y={text:Te,attr:Pe,"attr-contain":Ne,value:Be,row:Oe,"bg-image":Le};function g(a,e){if(a)return G(a,e,Ce)}function _(a,e){if(a)return G(a,e,Ie)}function G(a,e,t){if(!a)return;const r=a.split("||").map(s=>s.trim()).filter(s=>!!s&&s.includes("|"));for(const s of r){const n=De(s);if(!n)continue;const i=t(e??document.documentElement,n.selector,n.instructions);if(i)return i}}function De(a){const[e,t]=a.split("|");if(!t)return;const r=(t?.startsWith("[")&&t.endsWith("]")?t.substring(1,t.length-1).split(","):[t]).map(s=>{const n=s.indexOf(":"),i=n!==-1;return{extractor:i?s.substring(0,n):s,param:i?s.substring(n+1):""}});return{selector:e||void 0,instructions:r}}function Ce(a,e,t){if(!e)return Q(a,t);const r=e.split(",");for(const s of r){const n=Array.from(a.querySelectorAll(s));for(const i of n){const l=Q(i,t);if(l)return l}}}function Ie(a,e,t){const r=e?Array.from(a.querySelectorAll(e)):[a],s=[];for(const n of r)for(const i of t){const l=Y[i.extractor],o=l(n,i.param);if(o){s.push(o);break}}if(s.length)return s}function Q(a,e){for(const t of e){const r=Y[t.extractor],s=r(a,t.param);if(s)return s}}function Te(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>O(e.textContent)).filter(Boolean).join(" ").trim()||O(a.textContent)}function Pe(a,e){return O(a.getAttribute(e))}function Ne(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(s=>s.includes(e));r&&(t=a.getAttribute(r))}return O(t)}function Be(a){return a.value}function Oe(a,e){if(!e)return;const t=O(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return O(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function Le(a){const e=getComputedStyle(a).backgroundImage;if(!(!e||!e.startsWith("url(")))return e.slice(5,-2)||void 0}function O(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var je=(a=>(a[a.reading=1]="reading",a[a.paused=2]="paused",a[a.plan=3]="plan",a[a.completed=4]="completed",a[a.dropped=5]="dropped",a[a.deleted=6]="deleted",a))(je||{}),_e=(a=>(a[a.ok=1]="ok",a[a.hidden=2]="hidden",a[a.deleted=3]="deleted",a))(_e||{}),ze=(a=>(a[a.aggregator=0]="aggregator",a[a.scanlator=1]="scanlator",a))(ze||{}),Ae=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Ae||{}),q=(a=>(a.id="id",a.name="name",a.slug="slug",a))(q||{}),W=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(W||{});const Ee=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,We=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?|capitolo\.?|capitulo\.?|bölüm\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,ke=/\d+([_-~,.]\d+)?/,Ue=/[_-~,]/;function L(a){if(!a||!a)return;if(!isNaN(+a))return{chap:+a};const e=a.match(Ee),t=e?.[0]?a.replace(e[0],"").trim():a,r=t.match(We),s=t.match(ke),n=r?.[6],i=n??s?.[0];if(!i)return;const l=+i.replace(Ue,".");if(isNaN(l))return;const o=e?.[4];return{vol:o&&!isNaN(+o)&&a.indexOf(e[0])<a.indexOf(n?r[0]:s[0])?+o:void 0,chap:l}}function z(a){return a.sort((e,t)=>e.vol===void 0||t.vol===void 0?t.chap-e.chap:t.vol-e.vol||t.chap-e.chap),qe(a)}function qe(a){const e={};for(let t=a.length-1;t>=0;t--){const r=a[t],s=r.lang??"";r.vol!==void 0?e[s]=r.vol:e[s]!==void 0&&(r.inferVol=e[s])}return a}const Fe=[{seconds:1,locales:{en:"sec",vi:"gi\xE2y",tr:"ikinci",es:"segunda"}},{seconds:60,locales:{en:"min",vi:"ph\xFAt",tr:"dakika"}},{seconds:3600,locales:{en:"hour",vi:"gi\u1EDD",tr:"saat",fr:"heure",it:"ora",es:"hora"}},{seconds:86400,locales:{en:"day",vi:"ng\xE0y",tr:"g\xFCn",fr:"jour",it:"giorno",es:"d\xEDa"}},{seconds:604800,locales:{en:"week",vi:"tu\u1EA7n",tr:"hafta",fr:"semaine",it:"settimana",es:"semana"}},{seconds:2592e3,locales:{en:"month",vi:"th\xE1ng",tr:"ay",fr:"mois",it:"mese",es:"mes"}},{seconds:31536e3,locales:{en:"year",vi:"n\u0103m",tr:"yil",fr:"ann",it:"anno",es:"a\xF1o"}}];function Z(a,e){const t=a?.toLowerCase();if(!t)return;const r=Date.now();if(t.includes("now"))return r;if(t.includes("yesterday"))return r-864e5;const s=new Date(t);if(s instanceof Date){const c=s.valueOf();if(!isNaN(c))return s.getHours()===0&&s.getMinutes()===0?Math.min(r,c+432e5):c}const n=Fe.find(c=>e&&c.locales[e]&&t.indexOf(c.locales[e])!==-1?!0:t.indexOf(c.locales.en)!==-1);if(!n)return;const i=t.split(" ").filter(Boolean),l=K(i)??K(i,["a","an"]);if(!l)return;const o=r-l*n.seconds*1e3;return o>0?o:void 0}function K(a,e){for(let t=0;t<a.length;t++){const r=a[t];if(e?.includes(r))return 1;const s=+r;if(s)return s<0?void 0:s}}function X(a,e=location.origin){if(!a)return;const t=new URL(a.startsWith("//")?`${location.protocol}${a}`:a,location.origin+location.pathname).toString();return t.startsWith(e)?t.replace(e,""):t}function ee(a,{titleSlug:e,titleId:t}){if(!a)return"/";let r=a.replace("{titleSlug}",e);t&&(r=r.replace("{titleId}",t));const s=r.endsWith("/")?r:r+"/";return s.startsWith("/")?s:"/"+s}function Ve(a,e){const t=[...e],r=[];let s=!1,n=0;const i=Math.min(a.length,100);for(let o=0;o<i;o++){if(n>=10/2){const p=10-r.length;if(p>0){const y=o+p<=a.length?a.slice(o,o+p):t.slice(0,p);r.push(...y)}break}const c=a[o],u=c.id!==void 0,h=t.findIndex(p=>u&&p.id===c.id||p.slug===c.slug||p.name==c.name),d=h===-1?void 0:t.splice(h,1)[0];!d||d.chapters[0]?.chap!==c.chapters[0]?.chap?(s=!0,r.push({...c,changed:!0})):(n++,r.push(c))}if(!s)return{hasMore:!1,rawReleases:[]};if(r.length<=10)return{hasMore:!!a[a.length-1]?.changed,rawReleases:r};const l=[];for(let o=0;o<r.length;o++){const c=r[o];(c.changed||o<10)&&l.push(c)}return{hasMore:e.length<2||e.length-t.length<2,rawReleases:l}}function He(a,e){const t={};return a.forEach(r=>{const s=r.chapters.reduce((n,i)=>{const l=i.lang||e||"";return n[l]||(n[l]=[]),n[l].push(i),n},{});Object.entries(s).forEach(([n,i])=>{const l=`${r.slug}:${n}`;t[l]?(t[l].chapters.push(...i),z(t[l].chapters)):t[l]={...r,lang:n===""?void 0:n,chapters:i}})}),Object.values(t)}var R=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))(R||{}),Je=Object.defineProperty,Ye=(a,e,t)=>e in a?Je(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,D=(a,e,t)=>(Ye(a,typeof e!="symbol"?e+"":e,t),t);class k{constructor(e){D(this,"spec"),D(this,"siteMeta"),D(this,"tags"),D(this,"context"),D(this,"methodsMap",{[R.title]:()=>this.getRawTitleData(),[R.reader]:()=>this.getRawReaderData(),[R.releases]:()=>this.getRawReleasesData(),[R.search]:()=>this.getRawSearchData(),[R.chapters]:()=>this.getRawChaptersData()}),D(this,"normalizedTagsMap"),this.spec=e.spec,this.siteMeta=e.siteMeta,this.tags=e.tags,this.context=e.context}async getRawSearchData(){throw new Error("Unimplemented")}async getRawPageByType(e,t=!1){const r=await this.methodsMap[e](),s=!r&&Qe(this.spec);if(t&&!r&&!s)return;const n=location.origin+location.pathname;return{type:e,is404:s,specId:this.spec.id,siteName:g(this.spec.name),url:n,data:r,spec:this.spec,context:this.context}}parseReaderSlug(e,t,r){let s=t;if(s[0]!=="/"&&s.includes("/"))try{s=new URL(t,location.href).pathname}catch{}const n=s.endsWith("/")?s.slice(0,-1):s;if(e.includes("{")){const i=e.split("/").filter(Boolean),l=n.split("/").filter(Boolean);if(i.length<l.length){const o=l[i.indexOf("{lang}")],c=l[i.indexOf("{titleId}")],u=l[i.indexOf("{titleSlug}")],h=e.replace("{lang}",o).replace("{titleId}",c).replace("{titleSlug}",u);if(n.startsWith(h))return{basePath:h,lang:o.toLowerCase(),titleId:c,titleSlug:u,slug:n.replace(h,"")}}}else if(n.startsWith(e))return{basePath:e,slug:n.replace(e,"")};return{basePath:"",slug:n[0]==="/"?n.substring(1):n}}parseTitleSlug(e){if(typeof e!="string")return{};const t=$(e),r=t?.split("/").filter(Boolean);if(!r?.length)return{};const s=this.siteMeta.titleBase.split("/").filter(Boolean),n=s.indexOf("{slug}");return(n===-1?r.length-s.length>=1:r.length===s.length)?{id:r[s.indexOf("{id}")],slug:n===-1?r.slice(s.length).join("/"):r[n]}:{slug:t}}finalizeRawReleasesData(e){const t=this.spec.releases?.title?.lang?this.siteMeta.defaultLang:void 0,r=He(e.rawReleases,t);if(r.length)return this.context?.oldRawReleases?Ve(r,this.context.oldRawReleases):{rawReleases:r,hasMore:!0}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=Ge(this.tags)),r=e.map(s=>t[F(s)]).filter(Boolean);return r.length===0?void 0:Array.from(new Set(r)).sort((s,n)=>s-n)}}D(k,"specId"),D(k,"siteId");function Ge(a){const e={};return a.forEach(({id:t,name:r,altNames:s})=>{e[F(r)]=t,s&&s.forEach(n=>{e[F(n)]=t})}),e}function F(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}function Qe(a){return a[404]&&document.querySelector(a[404])?!0:document.title.toLowerCase().includes("not found")}class w extends k{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await M(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const s=r.slice(0,100).map(i=>{const l=g(t.url,i),o=$(l),c=g(t.name,i),u=g(t.at,i);if(!(!o||!c))return{titleEl:i,id:g(t.id,i),path:o,name:c,lang:g(t.lang,i)?.toLowerCase(),at:Z(u,this.siteMeta.defaultLang)}}).filter(Boolean);if(!s.length)return;const n=[];return await Promise.all(s.map(async i=>{const{path:l,titleEl:o,lang:c,at:u,...h}=i,{id:d,slug:p}=this.parseTitleSlug(l);if(!p)return;const y=h.id||d,v=await this.getChapters(e,{root:o,titleId:y,titleSlug:p})??[];v.length&&n.push({slug:p,chapters:c||u?v.map(f=>({...f,elIndex:void 0,lang:f.lang??c,ts:f.ts??u})):v,...h,id:y})})),this.finalizeRawReleasesData({rawReleases:n})}getRawTitleData(){return this.getTitleData(this.spec.title)}async getTitleData(e){if(!e||(e.sel||e.lazy)&&!await M(e.sel??e.name,{lazy:!!e.lazy}))return;const t=g(e.name);if(!t)return;const{id:r,slug:s}=this.parseTitleSlug(location.pathname);if(!s)return;let n=_(e.tags)??[];n.length===1&&(n=n[0].split(",").map(u=>u.trim()).filter(Boolean));const i=g(e.type),l=_(e.langs)?.map(u=>u.toLowerCase()),o=r||g(e.id),c=await this.getChapters(e.chapter,{lazy:!0,titleId:o,titleSlug:s})??[];return{id:o||g(e.id),url:location.origin+location.pathname,slug:s,name:t,langs:l?.length?l:e.langs&&this.siteMeta.defaultLang?[this.siteMeta.defaultLang]:void 0,tags:this.getTagIdsFromNames([...n??[],...i?[i]:[]]),chapters:c,hasMoreChapters:e.hasMore?!!document.querySelector(e.hasMore):void 0,img:e.img?await this.getValidImgSrc(e.img):void 0,firstUrl:this.getFirstChapterUrl()}}getFirstChapterUrl(){const e=g(this.spec.title?.first);if(e){if(e.startsWith("http"))return e;try{return new URL(e,location.href).href}catch{return}}}getValidImgSrc(e){return B(33,30,()=>{const t=g(e);return t&&!t.startsWith("data:")?t.split(" ")[0]:void 0})}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await w.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await w.verifyImgsCotainer(r)))return;const s=e.reader.title,n=document.querySelector(s.sel);if(!n)return;const i=g(s.name,n),l=g(s.url,n),{slug:o,id:c}=this.parseTitleSlug(l),u=g(s.img,n);if(!i||!l||!o)return;const h=c||g(s.id),d=!!this.context?.disableLazyChapters,p=!!this.context?.includeHiddenChapters,y=await this.getChapters(e.reader?.chapter,{titleId:h,titleSlug:o,lazy:p||!d,includeHiddenChapters:p,timeoutMs:p?3e3:12e4})??[],v=g(e.reader.label)?.toLowerCase().replace(i.toLowerCase(),"");if(!v)return;const{vol:f,chap:x=0}=L(v)||{},{slug:m,basePath:S,lang:I,titleId:A}=this.parseReaderSlug(ee(t.readerBase,{titleId:h,titleSlug:o}),location.pathname,location.href);return this.finalizeRawReaderData({vol:f,chap:x,lang:I??g(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0),slug:m,basePath:S,imgs:r?void 0:_(e.reader.imgs),title:{id:h||A||g(s.id),url:l,slug:o,name:i,langs:I?[I]:void 0,img:X(u),chapters:y,hasMoreChapters:d&&!y.length&&!!e.reader?.chapter&&!e.reader?.chapter.trigger}},{prevSlug:this.findNeighborChapter({sel:e.reader.prev,basePath:S}),nextSlug:this.findNeighborChapter({sel:e.reader.next,basePath:S})})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===W.blank)return;const t=e===W.reader,r=!e||e===W.title,s=t?(await this.getRawReaderData())?.title:r?await this.getRawTitleData():void 0;let n=s?.chapters;if(!t&&!r&&(n=await this.getChapters(this.spec.chapters?.chapter,{lazy:this.spec.chapters?.lazy})),!n)return;const i=this.context?.lang,l=i?n.filter(o=>!o.lang||o.lang===i):n;return{chapters:l,title:s?{...s,chapters:[]}:await this.getTitleData(this.spec.chapters?.title),hasMore:!1,asc:!1,total:l.length}}async getRawSearchData(){const e=this.spec.search?.title;if(!e)return;const{chapter:t}=e,r=[];return await Promise.all(Array.from(document.querySelectorAll(e.sel)).map(async s=>{const n=g(e.url,s),i=$(n),l=g(e.name,s),{slug:o,id:c}=this.parseTitleSlug(i);!i||!l||!o||r.push({id:c,slug:o,name:l,chapters:await this.getChapters(t,{root:s,titleId:c,titleSlug:o})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t=document.documentElement,titleId:r="",titleSlug:s="",includeHiddenChapters:n=!1,lazy:i=!0,timeoutMs:l}){if(!e)return;let o=null;if(e.trigger){if(!n||(o=document.querySelector(e.trigger),!o))return;o.click()}const c=[],u=await M(e.sel,{root:t,all:!0,lazy:i,timeoutMs:l});if(!u?.length)return o?.click(),[];const h=(u??[]).map((f,x)=>({id:g(e.id,f),label:g(e.label,f),url:g(e.url,f),at:g(e.at,f),elIndex:x}));o?.click();const d=h.map(({label:f})=>L(f)),p=d[1]?.chap;!d[0]&&(p===void 0||p<=1)&&(d[0]={chap:0});const{readerBase:y}=this.siteMeta,v=ee(y,{titleId:r,titleSlug:s});return d.forEach((f,x)=>{if(!f)return;const{id:m,url:S,at:I,elIndex:A}=h[x],E={...f,id:m,elIndex:A,ts:Z(I,this.siteMeta.defaultLang)},b=S?.startsWith("http")&&!S.includes(`//${location.hostname}/`),J=b?S:$(S);if(!J){c.push(E);return}if(b){c.push({...E,slug:J});return}const{slug:ta,lang:aa}=this.parseReaderSlug(v,J,S);c.push({...E,slug:ta,lang:aa})}),z(c)}static async isReaderPage(e){return!!e.sel&&!!await M(e.sel,{lazy:!!e.lazy})}static async verifyImgsCotainer(e){const t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>`${r} img, ${r} canvas`).join(",");return!!await M(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=g(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const s=$(r);if(s)return this.parseReaderSlug(t,s,r).slug}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const s=e.title?.chapters;if(!s?.length){const c=L(t),u=L(r);return!c&&!u?e:{...e,prev:c?{...c,slug:t}:void 0,next:u?{...u,slug:r}:void 0}}let n,i,l,o;for(let c=0;c<s.length&&!(n&&(!t||l)&&!r&&o);c++){const u=s[c];!n&&(e.slug==u.slug||e.chap===u.chap&&(e.vol===u.vol||e.vol===void 0))?(n=u,i=c):!l&&t===u.slug?l=u:!o&&r===u.slug&&(o=u)}return i!==void 0&&(l??(l=s[i+1]),o??(o=s[i-1])),{...e,inferVol:n?.inferVol,prev:l,next:o}}}var Ze=Object.defineProperty,Ke=(a,e,t)=>e in a?Ze(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Xe=(a,e,t)=>(Ke(a,typeof e!="symbol"?e+"":e,t),t);class te extends w{parseTitleSlug(e){return{slug:$(e)?.split("/").filter(Boolean)[1]}}}Xe(te,"specId","bato");function et(){return Math.random().toString(16).slice(2)}async function tt({addListener:a,removeListener:e,transform:t,filter:r,handler:s,onTimeout:n,timeout:i,once:l}){return new Promise(o=>{a(h);const c=()=>l===!0&&e(h),u=i?setTimeout(()=>{c(),o(void 0),n?.()},i):void 0;async function h(d,...p){d=t?t(d):d,d!==void 0&&(!r||r(d,...p))&&(c(),o(d),s?.(d,...p),u&&clearTimeout(u))}})}async function at(a){return(await tt({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function rt(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:s,args:n}=a,i={reqId:et(),event:s,args:n};return(e||window)?.postMessage(i,r??"*"),(await at({filter:l=>l?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const j={isAny:!0};function T(a,...e){return rt({event:"tk:fetchResult",args:{baseUrl:a,segments:e}})}var st=Object.defineProperty,nt=(a,e,t)=>e in a?st(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,it=(a,e,t)=>(nt(a,typeof e!="symbol"?e+"":e,t),t);const ae=class Me extends w{async getRawReleasesData(){let e;try{const r=Array.from({length:2},async(s,n)=>{const i=`https://api.${location.host}/chapter?accept_erotic_content=true&page=${n+1}&order=new`;return(await fetch(i)).json()});e=(await Promise.all(r)).flat()}catch{return}const t=[];return e.forEach(r=>{const{vol:s,chap:n,hid:i,lang:l,updated_at:o,md_comics:c}=r,u=typeof n=="string"&&!isNaN(+n)?+n:void 0;typeof u=="number"&&t.push({id:c.hid,slug:c.slug,name:c.title,chapters:[{slug:i,vol:typeof s=="string"&&!isNaN(+s)?+s:void 0,chap:u,lang:l,ts:new Date(o).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await T(`https://api.${location.host}`,"comic",j,"chapters");if(!t)return e;const r=t.url.split("/").filter(Boolean).slice(-2)[0],s=re(t.value),n=g("h1 ~ div.text-sm span:first-child|row:demographic"),i=n?this.getTagIdsFromNames([n])?.[0]:void 0;return i&&!e.tags?.includes(i)&&(e.tags?.push(i),e.tags?.sort((l,o)=>l-o)),{...e,img:e.img??X(g(this.spec.title?.img)),id:r,hasMoreChapters:s?.hasMore??!1,chapters:s?.chapters??[]}}async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,lang:e.lang&&e.lang?.length<=6?e.lang:Me.getLangFromReaderSlug(e.slug)||e.lang}}static getLangFromReaderSlug(e){const t=e.split("-");let r;for(let s=t.length-1;s>0;s--){const n=t[s];if(!isNaN(+n))break;r=r?`${n}-${r}`:n}return r&&r.length<=6?r:void 0}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e,lang:t="en",skip:r}=this.context,s=r?Math.floor(r/1e3)+1:void 0;try{const n=await fetch(`https://api.${location.host}/comic/${e}/chapters?lang=${t}&limit=1000${s&&s>1?`&page=${s}`:""}`),i=re(await n.json());return i?{...i,lang:t,asc:!1}:void 0}catch{return}}};it(ae,"specId","comick");let lt=ae;function re(a){if(!Array.isArray(a?.chapters))return;const e=[];return a.chapters.forEach(t=>{const{vol:r,chap:s,hid:n,lang:i,updated_at:l}=t,o=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof o!="number"||e.some(c=>c.vol==r&&c.chap===o&&c.lang===i)||e.push({slug:n,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:o,lang:i,ts:new Date(l).valueOf()})}),{chapters:z(e),total:a.total??e.length,hasMore:a.total>a.limit}}function se(a,e){const t=a[0]===e?a.substring(1):a;return t[t.length-1]===e?t.substring(0,t.length-1):t}var ot=Object.defineProperty,ct=(a,e,t)=>e in a?ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ut=(a,e,t)=>(ct(a,typeof e!="symbol"?e+"":e,t),t);class V extends w{async getRawReleasesData(){const e=this.detectNewSiteMeta(this.spec.releases,this.siteMeta);this.siteMeta=e??this.siteMeta;const t=await super.getRawReleasesData();if(t)return{...t,siteMeta:e}}async getRawTitleData(){const e=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(location.pathname)});this.siteMeta=e??this.siteMeta;const t=await super.getRawTitleData();if(t)return{...t,siteMeta:e}}async getRawReaderData(){const e=ne(this.spec.reader?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath($(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawReaderData();if(r)return{...r,siteMeta:t}}async getRawSearchData(){const e=ne(this.spec.search?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath($(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawSearchData();if(r)return{...r,siteMeta:t}}detectNewSiteMeta(e,t){if(!e)return;const r=e.title,s=document.querySelector(r.sel)??void 0;if(!s)return;const n=$(g(r.url,s));if(n!==void 0)return this.finalizeNewSiteMeta(t,{titleBase:this.extractBasePath(n)})}finalizeNewSiteMeta(e,{titleBase:t}){if(e.titleBase!==t)return{...e,titleBase:t,readerBase:e.readerBase.replace(e.titleBase,t)}}extractBasePath(e){return se(e,"/").split("/").slice(0,-1).join("/")}}ut(V,"specId","madara");function ne(a){if(!a)return;const e=document.querySelector(a.sel);return g(a.url,e)}var gt=Object.defineProperty,pt=(a,e,t)=>e in a?gt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ht=(a,e,t)=>(pt(a,typeof e!="symbol"?e+"":e,t),t);class ie extends w{async getRawReleasesData(){const e=await this.getVM();if(!e)return super.getRawReleasesData();const t=e.LatestJSON.slice(0,100).map(r=>{const s=r.IndexName;return{slug:s,name:r.SeriesName,chapters:[H(r,s)]}});return this.finalizeRawReleasesData({rawReleases:t})}parseTitleSlug(e){const{slug:t}=super.parseTitleSlug(e);return!t||t.includes("{")?{}:{slug:t}}async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:le(await this.getVM(),e.slug),hasMoreChapters:!1}}parseReaderSlug(e,t){const{slug:r,basePath:s}=super.parseReaderSlug(e,t);return{slug:r.replace(/-page-\d{1,3}\.html\/?$/,".html"),basePath:s}}async getRawReaderData(){const e=await this.getVM();if(!e)return;const t=document.querySelector(".ImageGallery img.img-fluid")?.getAttribute("ng-src"),r=e.IndexName,s=H(e.CurChapter,r);return this.finalizeRawReaderData({chap:s.chap,slug:s.slug,imgs:ft(e,t??void 0),basePath:"/"+this.siteMeta.readerBase.replace("{titleSlug}",r)+"/",title:{name:e.SeriesName,slug:r,url:`/${this.siteMeta.titleBase}/${r}`,chapters:le(e,r),hasMoreChapters:!1}})}getVM(){return B(50,100,()=>window.angular?.element?.(document.documentElement)?.scope()?.vm)}}ht(ie,"specId","manga4life");function le(a,e){return(a?.Chapters??a?.CHAPTERS??[]).sort((t,r)=>r.Chapter-t.Chapter).map(t=>H(t,e))}function H(a,e){const t=+a.Chapter[0],r=+a.Chapter.substring(1)/10;return{slug:`${e}-chapter-${r}${t&&t>1?`-index-${t}`:""}.html`,chap:r,ts:dt(a.Date)}}function dt(a){const e=new Date(a).valueOf();return e===e?e:void 0}function ft(a,e){let t=e?.split(".").slice(-1)[0]??"png";t=t.length>=3&&t.length<=4?t:"png";try{const r=a.CurChapter.Chapter.slice(1,-1),s=a.CurChapter.Chapter[a.CurChapter.Chapter.length-1],n=s!=="0"?`${r}.${s}`:r,i=`https://${a.CurPathName}/manga/${a.IndexName}/${a.CurChapter.Directory?`${a.CurChapter.Directory}/`:""}${n}-`;return a.Pages.map(l=>{const o=(l+"").padStart(3,"0");return`${i}${o}.${t}`})}catch{return}}var mt=Object.defineProperty,wt=(a,e,t)=>e in a?mt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,yt=(a,e,t)=>(wt(a,typeof e!="symbol"?e+"":e,t),t);const vt={a:.1,b:.2,c:.3,d:.4};class oe extends k{parseTitleSlug(e){return{slug:$(e)?.split("/").filter(Boolean)[1]}}async getRawReleasesData(){let e=[];try{e=(await(await fetch("https://api.mangadex.org/chapter?limit=96&offset=0&includes[]=manga&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&order[readableAt]=desc")).json()).data}catch{return}const t=[];return e.forEach(({relationships:r,attributes:s,id:n})=>{const i=r.find(({type:c})=>c==="manga"),l=C(s.volume),o=C(s.chapter);o!==void 0&&t.push({slug:i.id,name:Object.values(i.attributes.title)[0],chapters:[{slug:s.externalUrl||n,vol:l,chap:o,lang:s.translatedLanguage,ts:new Date(s.readableAt).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e="https://api.mangadex.org/manga/",[t,r]=await Promise.all([T(e,j),T(e,j,"feed")]);if(!t||!r)return;const s=r.value.data?.map?.(l=>{const{attributes:o,id:c}=l;if(typeof o!="object"||typeof c!="string"||!c)return;const{externalUrl:u,title:h,volume:d,chapter:p,translatedLanguage:y}=o;return{slug:u||c,label:h||void 0,vol:C(d),chap:C(p),lang:y||"en",ts:new Date(o.readableAt).valueOf()}}).filter(l=>l?.chap!=null)??[],{data:n}=t.value;if(!n)return;const i=ue({data:n,getTagIdsFromNames:l=>this.getTagIdsFromNames(l)});if(i)return{...i,chapters:z(s),hasMoreChapters:(r.value.total||0)>(r.value.limit||0)}}async getRawReaderData(){const e="https://api.mangadex.org/",[t,r,s]=await Promise.all([T(e,"chapter",j),T(e,"at-home","server",j),T(e,"manga",j,"aggregate")]);if(!t||!r||!s)return;const n=t.value.data,{volume:i,chapter:l,externalUrl:o,translatedLanguage:c}=n.attributes||{},{baseUrl:u,chapter:{data:h,dataSaver:d,hash:p}}=r.value,y=n.relationships?.find?.(b=>b.type==="manga");if(!y)return;const v=ue({data:y,getTagIdsFromNames:b=>this.getTagIdsFromNames(b)});if(!v||typeof s.value.volumes!="object")return;const f=ce(s.value)??[];(typeof l!="string"||l==="none")&&!f.length&&f.push({chap:0,slug:n.id});const x=f.findIndex(b=>b.slug===n.id),m=n.relationships?.find?.(b=>b.type==="scanlation_group"),S=u.endsWith("/")?u:u+"/",I=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),A=`${S}${I?"data-saver":"data"}/`,E=((I?d:h)??[]).map?.(b=>`${A}${p}/${b}`)??[];return{externalUrl:o,vol:C(i),inferVol:f[x]?.inferVol,chap:C(l)||0,imgs:E,lang:c,slug:n.id,prev:f[x+1],next:f[x-1],basePath:"/chapter/",groupName:m?.attributes?.name,groupUrl:m?.attributes?.website,isWebtoon:y?.attributes?.tags?.some(b=>b.attributes.name.en==="Long Strip"),title:{...v,chapters:f}}}async getRawChaptersData(){if(!this.context)return;const{titleSlug:e,lang:t="en"}=this.context;let r;try{const s=await fetch(`https://api.mangadex.org/manga/${e}/aggregate?translatedLanguage[]=${t}`);r=ce(await s.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}yt(oe,"specId","mangadex");function C(a){if(typeof a!="string"||a==="none")return;const e=parseFloat(a);if(e!==e)return;const t=a[a.length-1];return e+(vt[t]??0)}function ce(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const s=C(t);return Object.values(r).map(({id:n,chapter:i})=>{const l=C(i);if(l!==void 0)return{vol:s,chap:l,slug:n}})}).flat().filter(Boolean).reverse();return z(e)}function ue({data:a,getTagIdsFromNames:e}){const{id:t,attributes:r,relationships:s}=a;if(!t||typeof t!="string"||typeof r!="object")return;const{title:n,availableTranslatedLanguages:i,altTitles:l,tags:o,contentRating:c}=r;if(typeof n!="object"||i&&!Array.isArray(i))return;const u=Object.values(n)[0];if(!u||typeof u!="string")return;const h=bt(),d=(i??[])?.map?.(m=>typeof m=="string"?m:void 0).filter(Boolean)??[],p=d.filter(m=>m&&(!h||h.includes(m))),y=l?.map?.(m=>{const[[,S]=[]]=Object.entries(m);return S}),v=s?.find?.(m=>m.type==="cover_art")?.attributes?.fileName,f=v?`https://uploads.mangadex.org/covers/${t}/${v}.256.jpg`:void 0,x=(o||[]).map(m=>m?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:y,langs:p.length>0?p:d.length>0?d:["en"],img:f,tags:e(x)}}function bt(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var Rt=Object.defineProperty,St=(a,e,t)=>e in a?Rt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,$t=(a,e,t)=>(St(a,typeof e!="symbol"?e+"":e,t),t);class ge extends w{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.id?.split("?")[0]}))}}async getRawReaderData(){if((await M(".current-viewtype",{lazy:!0,all:!1}))?.textContent?.trim().toLowerCase()!=="volume")return await super.getRawReaderData()}async getRawChaptersData(){const e=this.context?.lang;if(!e)return;const t=await M(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await M(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}$t(ge,"specId","mangafire");var xt=Object.defineProperty,Mt=(a,e,t)=>e in a?xt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Dt=(a,e,t)=>(Mt(a,typeof e!="symbol"?e+"":e,t),t);class pe extends w{async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,imgs:await this.getImgs()}}parseReaderSlug(e,t){const{slug:r,basePath:s}=super.parseReaderSlug(e,t),n=r.split("/").filter(Boolean),i=n[n.length-1];return{basePath:s,slug:i.startsWith("pg-")?n.slice(0,-1).join("/"):r}}async getImgs(){const e=await B(100,20,()=>window.imgsrcs),t=window.CryptoJS,r=t.enc.Hex.parse("e11adc3949ba59abbe56e057f20f883e"),s={iv:t.enc.Hex.parse("1234567890abcdef1234567890abcdef"),padding:t.pad.ZeroPadding};return t.AES.decrypt(e,r,s).toString(t.enc.Utf8).split(",")}}Dt(pe,"specId","mangago");var Ct=Object.defineProperty,It=(a,e,t)=>e in a?Ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Tt=(a,e,t)=>(It(a,typeof e!="symbol"?e+"":e,t),t);class he extends w{async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:e.chapters.map(t=>({...t,slug:t.slug?.split("/").filter(Boolean).slice(-1)[0]}))}}}Tt(he,"specId","mangaplus");var Pt=Object.defineProperty,Nt=(a,e,t)=>e in a?Pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Bt=(a,e,t)=>(Nt(a,typeof e!="symbol"?e+"":e,t),t);class de extends w{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.slug.substring(t.slug.lastIndexOf("-")+1)||void 0}))}}}Bt(de,"specId","mangareader");var Ot=Object.defineProperty,Lt=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,jt=(a,e,t)=>(Lt(a,typeof e!="symbol"?e+"":e,t),t);class fe extends V{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,id:await this.getReaderTitleId()}}}async getReaderTitleId(){const e=await window.HISTORY?.getStored?.();if(!e||typeof e!="object")return;const t=Object.values(e).filter(Boolean);if(!t.length)return;t.sort((s,n)=>n.time-s.time);const r=t[0].manga_ID;return typeof r=="string"?r:typeof r=="number"?r+"":void 0}detectNewSiteMeta(e,t){if(!e)return;const r={...t,releases:se(location.pathname,"/")},s=e.title,n=document.querySelector(s.sel)??void 0;if(!n)return;const i=$(g(s.url,n));if(i===void 0)return;const l=n.querySelector(s.chapter.sel)??void 0;if(!(!l||$(g(s.chapter.url,l))===void 0))return r.titleBase=this.extractBasePath(i),t.titleIdType===q.id&&(g(s.id,n)||(t.titleIdType=q.name)),this.finalizeNewSiteMeta(t,r)}finalizeNewSiteMeta(e,t){const r=Object.keys(t),s={...e};let n=!1;return r.forEach(i=>{const l=t[i];l!==e[i]&&(s[i]=l,n=!0)}),n?s:void 0}}jt(fe,"specId","mangastream");var _t=Object.defineProperty,zt=(a,e,t)=>e in a?_t(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,At=(a,e,t)=>(zt(a,typeof e!="symbol"?e+"":e,t),t);class me extends w{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,name:e.title.name.replace("Ritorna a","").trim()}}}}At(me,"specId","mangaworld");var Et=Object.defineProperty,Wt=(a,e,t)=>e in a?Et(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,kt=(a,e,t)=>(Wt(a,typeof e!="symbol"?e+"":e,t),t);class we extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(e)return{...e,hasMoreChapters:e.chapters.length===50}}}kt(we,"specId","mgeko");var Ut=Object.defineProperty,qt=(a,e,t)=>e in a?Ut(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ft=(a,e,t)=>(qt(a,typeof e!="symbol"?e+"":e,t),t);class ye extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await T(`https://api.${location.host}`,"chapter","query");if(!t)return;let r;try{r=new URL(t.url).searchParams.get("series_id")}catch{return}if(!r)return;const{first_page:s,last_page:n}=t.value.meta||{};return{...e,id:r,hasMoreChapters:s!==n}}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e}=this.context;try{const t=await(await fetch(`https://api.${location.host}/chapter/query?page=1&perPage=1000&query=&order=desc&series_id=${e}`)).json();if(!t?.data?.map)return;const r=[];return t.data.forEach(s=>{const{chapter_name:n,chapter_slug:i,created_at:l}=s;if(typeof n!="string"||typeof i!="string")return;const o=L(n);if(o?.chap)return{...o,slug:i,ts:l&&new Date(l).valueOf()||void 0}}),{chapters:r,hasMore:!1,asc:!1}}catch{return}}}Ft(ye,"specId","reaper");var Vt=Object.defineProperty,Ht=(a,e,t)=>e in a?Vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Jt=(a,e,t)=>(Ht(a,typeof e!="symbol"?e+"":e,t),t);class ve extends w{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=_(".info-detail__row > .genre-btn,.info__right .stats__row:first-child|text")?.map(r=>[r,...r.split(" ")]).flat();return be({...e,tags:this.getTagIdsFromNames(t)??[]},".episode-header .episode-cnt")}async getRawReaderData(){const e=await super.getRawReaderData();if(!e)return;const t=`${location.origin}/series/${e.title.slug}/info`;return{...e,title:{...be({...e.title,url:t,tags:[]},".episode-list .js-ep-cnt"),hasMoreChapters:!1}}}async getRawChaptersData(){if(!this.context)return;const{rawId:e,skip:t}=this.context,r=1e3,s=t?Math.floor(t/1e3)+1:1;try{const n=await fetch(`/series/${e}/episodes?page=${s}&sort=NEWEST&max_limit=${r}`);return Yt(await n.json())}catch{return}}parseTitleSlug(e){if(!e)return{};const t=e.split("/").filter(Boolean);return{slug:t[1]??t[0]}}}Jt(ve,"specId","tapas");function be(a,e){const t=Gt(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function Yt(a){const e=a?.data?.episodes;if(!Array.isArray(e))return;const t=e.map(s=>({chap:s.pending_scene??s.scene,slug:s.id+"",ts:new Date(s.publish_date)?.valueOf?.()||void 0})),r=a?.data?.pagination;return{chapters:t,total:r?.total??t.length,hasMore:!!r?.has_next}}function Gt(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var Qt=Object.defineProperty,Zt=(a,e,t)=>e in a?Qt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Kt=(a,e,t)=>(Zt(a,typeof e!="symbol"?e+"":e,t),t);class Re extends w{async getRawTitleData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(t||!r)return;const s=await super.getRawTitleData();if(!s)return;const n=location.pathname.split("/")[1];return{...s,slug:`${s.slug}?title_no=${r}`,id:r,langs:[n].filter(Boolean),chapters:s.chapters.map(i=>({...i,lang:n})),hasMoreChapters:(document.querySelector(".paginate")?.childElementCount??1)>1}}async getRawReaderData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(!t||!r)return;const s=L(g(".paginate > span:not(:first-child)|text"));if(s===void 0)return;const{chap:n}=s,i=document.title.split("|")[1]?.trim();if(!i)return;const l=location.pathname.split("/"),o=`${l.slice(0,4).join("/")}/list?title_no=${r}`,c=await this.getChapters({sel:"#sequence_scroll li.eg-flick-panel,#toolbar .episode_lst li[data-episode-no]",url:"a|attr:href",label:"|attr:data-episode-no || .num|text"},{lazy:!1,titleId:r,titleSlug:o}),u=l[1];return{chap:n,lang:u,slug:`${location.pathname}?title_no=${r}&episode_no=${t}`,basePath:"",imgs:await this.getReaderImgs(),isWebtoon:!0,title:{id:r,url:o,slug:o,name:i,langs:[u],chapters:(c??[]).map(h=>({...h,lang:u})),hasMoreChapters:!1}}}async getReaderImgs(){const e=_("#_imageList img|[attr:data-url,attr:src]");return e?.length?e:await B(100,50,()=>window.__viewerState__?.scrollViewerParam?.imageList?.map(({url:t})=>t).filter(Boolean))}parseReaderSlug(e,t,r){if(!r)return{basePath:"",slug:t};if(r.startsWith("http://")||r.startsWith("https://")){const s=U(r);return{basePath:"",slug:s.pathname+s.search}}return{basePath:"",slug:r}}}Kt(Re,"specId","webtoon");const Xt=[te,lt,V,ie,oe,ge,pe,he,de,fe,me,we,ye,ve,Re];function Se(a){const e=Xt.find(t=>t.specId===a.spec.id)??w;return new e(a)}async function ea(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:$e(t,e.generic);if(!r.length)return;const s=Se({...a,spec:e,siteMeta:t});return await N(r.map(n=>s.getRawPageByType(n,r.length>1)))}return await N((a.genericSpecs??[]).map(t=>{const r=$e(t.meta,t.generic);if(!r.length)return[];const s=Se({...a,spec:t,siteMeta:t.meta});return r.map(n=>s.getRawPageByType(n,!0))}).flat())}function $e(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,s=location.pathname.split("/").filter(Boolean),n=xe(s,r),i=xe(s,t);if(n&&i)return[R.reader,R.title];const l=[];return n!==!1&&!i&&l.push(R.reader),i!==!1&&!n&&l.push(R.title),!l.length&&e?[R.reader,R.title]:l}function xe(a,e){if(!e)return;const t=e.split("/").filter(Boolean),r=t.indexOf("{slug}"),s=r===t.length-1,n=!s&&r!==-1;if(s&&(t.pop(),!t.length))return;const i=a.length-t.length;if(n?i<0:i<=0)return!1;let l=!1;for(let o=0;o<t.length;o++){const c=t[o];if(c[0]!=="{"){if(c!==a[o])return!1;l=!0}}if(l&&i===(n?0:1))return!0}P.PageType=R,P.scrape=ea});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trackkun-dom",
3
3
  "author": "endyquang",
4
- "version": "1.6.1",
4
+ "version": "1.7.0",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Trkun DOM parser",
7
7
  "main": "index.js",
package/specs.json CHANGED
@@ -1 +1 @@
1
- [{"404":"img[src*=\"/images/error-message\"]","id":"asura","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}/chapter","searchBase":"series?page=1&name=","titleIdType":"name","defaultLang":"en","trailing":false},"releases":{"title":{"sel":"div:has(> a[href=\"/series\"]) + div > div > div > div:nth-child(2)","name":"span a|text","url":"span a|attr:href","chapter":{"sel":"div:has(> p):has(a)","url":"a[href*=\"/chapter/\"]|attr:href","label":"a[href*=\"/chapter/\"] p|text","at":"div + p|text"}}},"title":{"name":"div:has(> div a[href*=\"/sharer/\"]) span|text","img":"img[alt=\"poster\"]|attr-contain:src","type":"div:has(> img[alt=\"poster\"]) h3:first-child|row:type","tags":"div:has(> h3:first-child):has(> div:last-child:nth-child(2)) button|text","chapter":{"sel":"div:has(> h3 > a[href*=\"/chapter/\"])","url":"a|attr:href","label":"a|text","at":"h3:not(:first-child)|text"}},"reader":{"label":"h2|text","imgDivs":"div:has(> img[alt*=\"chapter\"])","content":"body","prev":"a[href*=\"/chapter/\"]:has(svg.lucide-chevron-left)|attr:href","next":"a[href*=\"/chapter/\"]:has(svg.lucide-chevron-right)|attr:href","title":{"sel":"a[href*=\"series/\"]:not([href$=\"series/\"]):not([href*=\"/chapter/\"])","name":"span|text","url":"|attr:href"},"chapter":{"trigger":"button:has(> h2)","sel":".dropdown-content > a","label":"h2|text","url":"|attr:href"}},"search":{"title":{"sel":"a[href*=\"series/\"]:not([href$=\"series/\"]):has(div span:first-child)","url":"|attr:href","name":"div:has(> span:first-child):has(> span:nth-child(3):last-child) span:first-child|text"}}},{"404":"#content > .wrapper > .notf img, body:empty","id":"mangastream","generic":true,"name":"meta[itemprop=\"name\"]|attr:content","meta":{"releases":"","titleBase":"series","readerBase":"","searchBase":"?s=","idBase":"?p=","titleIdType":"id","defaultLang":"en","trailing":true},"releases":{"title":{"sel":".listupd .utao .uta, .bixbox .bs.styletere","id":"a.series[rel]|attr:rel","name":"h4, .info .tt, .tt a, .series > h3|text","url":"a|attr:href","chapter":{"sel":".luf ul li, .chapter-list > a, .chfiv > li","label":"a, .epxs|text","url":"a|attr:href || |attr:href","at":"a + span, .expdate, .newchtimeluffy|text"}}},"title":{"sel":"#chapterlist > ul","id":".bookmark[data-id]|attr:data-id || #rating-form input[name=\"bs_table_id\"]|attr:value","name":"h1.entry-title|text","img":".thumb img|attr-contain:src","type":".imptdt a[href*=\"type=\"]|text || .imptdt:first-of-type i|text","tags":".postbody .mgen > a|text","chapter":{"sel":"#chapterlist > ul > li","url":"a|attr:href","label":".chapternum|text","at":".chapterdate|text"}},"reader":{"sel":"#readerarea","content":"#readerarea","id":".ctop option:selected|attr:data-id","label":"h1.entry-title|text","title":{"sel":".headpost .allc","name":"a|text","url":"a|attr:href"},"prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","chapter":{"sel":".ctop #chapter option:not([disabled]):not([value=\"\"])","id":"|attr:data-id","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".listupd .bsx","name":".bigor .tt|text","url":"a|attr:href"}}},{"404":".error-404.not-found","id":"madara","generic":true,"name":"a.logo|attr:title || meta[property=\"og:site_name\"]|attr:content","meta":{"releases":"","titleBase":"manga","readerBase":"manga/{titleSlug}","idBase":"?p=","searchBase":"?post_type=wp-manga&s=","defaultLang":"en","titleIdType":"id","trailing":true},"releases":{"title":{"sel":".page-listing-item .page-item-detail, .lastest-content .page-item-detail","id":"[data-post-id]|attr:data-post-id","name":"h3 a, .item-summary h3|text","url":"a|attr:href","chapter":{"sel":".chapter-item","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}},"title":{"sel":"body.manga-page","id":"#manga-chapters-holder|attr:data-id || .rating-post-id|attr:value || [data-action=\"bookmark\"]|attr:data-post","name":"h1|text","img":".summary_image .img-responsive, .summary_image img, .series-img img|[attr:data-src,attr-contain:src]","tags":"a[rel=\"tag\"][href*=\"genre\"],a[rel=\"tag\"][href*=\"tag\"],.genres-content|text","type":".post-content_item .summary-heading|row:type","chapter":{"sel":"li.wp-manga-chapter, .chapter-ul > li","url":"a|attr:href","label":"a, .chapter-title-date > p|text","at":".c-new-tag|attr:title || .chapter-release-date i|text"}},"reader":{"sel":".entry-content .read-container","content":".reading-content","label":".breadcrumb li.active|text","title":{"sel":".breadcrumb li:nth-last-of-type(2) a","id":"#manga-reading-nav-head|attr:data-id","name":"|text","url":"|attr:href"},"prev":"a.btn.prev_page|attr:href","next":"a.btn.next_page|attr:href","chapter":{"sel":"#manga-reading-nav-head select.single-chapter-select > option:not([disabled])","label":"|text","url":"|attr:data-redirect"}},"search":{"title":{"sel":".c-tabs-item__content","name":"h3 a|text","url":"a|attr:href","chapter":{"sel":".tab-meta","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}}},{"404":".elapi > a[href*=\"/search?q=\"]","id":"mangahub","meta":{"releases":"","titleBase":"manga","readerBase":"chapter/{titleSlug}","searchBase":"search?q=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":".list-group-item .media","name":"h4.media-heading a|text","url":".media-heading a|attr:href","at":".media-heading .small|text","chapter":{"sel":".media-body > a","label":"|text","url":"|attr:href"}}},"title":{"sel":"#chapters-tab .tab-content","name":"#mangadetail h1|text","img":"#mangadetail img.manga-thumb|attr-contain:src","tags":"#mangadetail a.genre-label|text","chapter":{"sel":"#chapters-tab li.list-group-item","label":"a:not([rel]) > span:first-child > span:first-child,a > span:first-child > span:first-child|text","url":"a:not([rel])|attr:href || a|attr:href","at":"small|text"}},"reader":{"content":"#mangareader .container-fluid, #mangareader","label":"h3|text","prev":".chapter-pager .previous a[href*=\"/chapter/\"]|attr:href","next":".chapter-pager .next a[href*=\"/chapter/\"]|attr:href","title":{"sel":"h3 a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pager-dropdown .dropdown-menu > li > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":".media-manga","name":"h4 a|text","url":"h4 a|attr:href","chapter":{"sel":".media-body","label":"a[href*=\"/chapter/\"]|text","url":"a[href*=\"/chapter/\"]|attr:href"}}}},{"id":"manga4life","meta":{"releases":"","titleBase":"manga","readerBase":"read-online","searchBase":"search/?name=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":".BoxBody.LatestChapters .Chapter","name":".Image > a|attr:title","url":".Image > a|attr:href","chapter":{"sel":".Label > a","label":".ChapterLabel|text","url":"|attr:href","at":".DateLabel|text"}}},"title":{"name":".BoxBody h1|text","img":"meta[property=\"og:image\"],meta[property=\"twitter:image:src\"]|attr:content","tags":"a[href*=\"search/?genre=\"]|text","type":"a[href*=\"search/?type=\"]|text"},"search":{"title":{"sel":".SearchFilterNav + .row > div[ng-repeat^=\"Series\"]","name":"div:nth-child(2) a.SeriesName|text","url":"a|attr:href"}}},{"id":"mangadex","meta":{"releases":"about:blank","titleBase":"title","readerBase":"chapter","searchBase":"titles?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"slug","trailing":false}},{"id":"comick","meta":{"home":"home","releases":"about:blank","titleBase":"comic","readerBase":"comic/{titleSlug}","searchBase":"search?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#updates-container div[title]","name":"|attr:title","url":"a[href^=\"/comic/\"]|attr:href","chapter":{"sel":"a:last-child","label":"div:first-child|text","url":"|attr:href","at":"div:nth-child(2)|text"}}},"title":{"name":"h1|text","img":"a[href$=\"/covers\"] > img,a[href$=\"/cover\"] > img|attr-contain:src","langs":"#chapter-header + div select option:not([value=\"\"]):not([value=\"all\"])|attr:value","tags":"table a.link[href^=\"/search?genres=\"]|text","type":"h1 ~ div.text-sm span:first-child|row:origination","first":"div:has(> a[href*=\"/comic/\"] + button) a|attr:href"},"reader":{"lazy":true,"sel":".reader-container","content":".reader-container","label":"select:first-of-type option[selected]|text","title":{"sel":"div > a[href*=\"/comic/\"]","name":"|text || img[alt]|attr:alt","url":"|attr:href"},"lang":"select:last-of-type|value","prev":".reader-container a:first-child[href^=\"/comic/\"]:not(:last-child)|attr:href","next":".reader-container a:last-child[href^=\"/comic/\"]|attr:href","chapter":{"sel":"select:first-of-type option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"id":"bato","meta":{"releases":"","titleBase":"series","readerBase":"chapter","searchBase":"search?word=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"#series-list > .item","name":"a.item-title|text","url":"a.item-title|attr:href","lang":"em[data-lang]|attr:data-lang","chapter":{"sel":".item-volch","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h3.item-title a|text","img":".attr-cover > img|attr-contain:src","langs":".title-set em[data-lang]|attr:data-lang","tags":".attr-main .attr-item .text-muted|row:genres","chapter":{"sel":".episode-list > .main > .item","label":"a.chapt > b|text","url":"a.chapt|attr:href","at":".extra > i|text"}},"reader":{"content":"#viewer","label":"title|text","title":{"sel":"h3.nav-title a","name":"|text","url":"|attr:href"},"lang":"h3.nav-title em[data-lang]|attr:data-lang","prev":".nav-prev > a[href^=\"/chapter/\"]|attr:href","next":".nav-next > a[href^=\"/chapter/\"]|attr:href","chapter":{"sel":".nav-epis > select option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"404":"#error > .attention","id":"mangago","meta":{"releases":"list/latest","titleBase":"read-manga","readerBase":"read-manga/{titleSlug}","searchBase":"r/l_search/?name=","defaultLang":"en","titleIdType":"slug","trailing":true},"releases":{"title":{"sel":"ul#search_list > li > div","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}},"title":{"name":".w-title h1|text","img":".article .cover img,#information img|attr-contain:src","tags":".manga_right a[href*=\"/genre/\"],.manga_info ul.uk-list a[href*=\"/genre/\"]|text","chapter":{"sel":"#chapter_table tbody tr, table.uk-table tbody tr","label":"h4 a b, a.chico b|text || a.chico|text","url":"h4 a, a.chico|attr:href","at":"td:last-child|text"}},"reader":{"label":"#navi h3 span:last-child,#series + a.chapter|text","title":{"sel":"#navi a#series,#reader-nav .nav li:first-child a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pagebar.top ul.dropdown-menu.chapter > li > a,#series ~ ul.chapter li a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#search_list > li .box","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}}},{"404":".nf-large + .nf-desc + a[href=\"/home\"]","id":"kakalot","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#latest-chap .inner > .item","id":".item-info h3|attr:data-id","name":".item-info h3 a|text","url":"a|attr:href","chapter":{"sel":".chapter-list > .cl-item","label":"a.chapter-name|text","url":"a|attr:href","at":".time|text"}}},"title":{"lazy":true,"sel":"#chapt-list .cl-header","id":"#main|attr:data-id","name":".detail-box h3.manga-name|text","img":".detail-box .manga-poster-img|attr-contain:src","tags":".detail-box .line-content a[href*=\"/genre/\"]|text","langs":"#chap-lang .lang-item|attr:data-code","chapter":{"sel":"#chapt-list .reading-list > .item","label":"a.chapter-name|text","url":"a.chapter-name|attr:href","at":".item-time|text"}},"reader":{"content":"#list-image","imgDivs":".card-wrap[data-url]","label":".breadcrumb-item.active|text","title":{"sel":".breadcrumb-item:nth-child(2) a","id":"#reading|attr:data-manga-id","name":"|text","url":"|attr:href"},"chapter":{"sel":".kbreadcrumb + .reading-option option.reading-item","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".manga-list > .inner > .item","name":".manga-name a|attr:title","url":".manga-name a|attr:href","chapter":{"sel":".latest-chapter .chapter-name","label":"|text","url":"|attr:href"}}}},{"id":"reaper","meta":{"releases":"latest/comics","titleBase":"series","readerBase":"series/{titleSlug}/chapters","searchBase":"?s=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"h5 + div > div > div:has(> a h5)","name":"a h5|text","url":"a|attr:href","chapter":{"sel":"div > a","url":"|attr:href","label":"span:first-child|text","at":"span:last-child|text"}}},"title":{"sel":"[aria-labelledby*=\"chapters_list\"] div > ul","name":"h1|text","img":"main .container img[alt]|attr-contain:src","first":"#content a:first-child:has(> button)|attr:href","chapter":{"sel":"[aria-labelledby*=\"chapters_list\"] ul > a","url":"|attr:href","label":"div:has(> span):not(:has(div))|text","at":"div + span|text"}},"reader":{"content":"#content","label":"h1|text","prev":"#content nav > div > div:first-child a|attr:href","next":"#content nav > div > div:last-child a|attr:href","title":{"sel":"#content","url":"a:has(svg[data-icon=\"house\"])|attr:href","name":"h2|text"}}},{"id":"tapas","meta":{"releases":null,"titleBase":"series/{slug}/info","readerBase":"episode","searchBase":"search?q=","defaultLang":"en","titleIdType":"id","chapters":"about:blank","trailing":false},"title":{"id":".button--subscribe|attr:data-tiara-event-meta-series-id","name":".info .title|text","img":".thumb img|attr:src","first":".episode-list__item a|attr:href","chapter":{"sel":".episode-list .episode-list__item > a","url":"|attr:data-id","label":"|attr:data-scene-number"}},"reader":{"content":".viewer__body","id":"div[id^=\"episode-\"][data-ep-id]|attr:data-ep-id","label":"div[id^=\"episode-\"][data-ep-scene]|attr:data-ep-scene","prev":"div[data-prev-id]:not([data-prev-id=\"-1\"])|attr:data-prev-id","next":"div[data-next-id]:not([data-next-id=\"-1\"])|attr:data-next-id","title":{"sel":"body","id":".subscribe-btn|attr:data-id","url":".subscribe-btn|attr:data-id","name":".series-info .title|text","img":".series-info .thumb img|attr:src"},"chapter":{"sel":".episode-list .list-body > li[data-id]","url":"|attr:data-id","label":".info__label|text"}}},{"id":"mangafire","meta":{"home":"home","releases":"updated","titleBase":"manga","readerBase":"read/{titleSlug}/{lang}","searchBase":"filter?keyword=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".unit > .inner","id":"a[data-tip]|attr:data-tip","name":".info a|text","url":"a|attr:href","chapter":{"sel":"ul.content li a","label":"span:first-child|text","url":"|attr:href","at":"span:last-child"}}},"title":{"id":".bookmark[data-id]|attr:data-id","name":".info h1[itemprop=\"name\"]|text","img":".poster img|attr-contain:src","tags":"#info-rating a[href*=\"/genre/\"]|text","langs":".tab-content[data-name=\"chapter\"] a.dropdown-item[data-code]|attr:data-code","chapter":{"sel":".tab-content[data-name=\"chapter\"] li.item[data-number]","url":"a|attr:href","label":"|attr:data-number","at":"a span:last-child|text"}},"reader":{"content":"#page-wrapper","imgDivs":".page","lstrip":".setting-tab.page-layout [data-value=\"longstrip\"].active","lstripBtn":".setting-tab.page-layout [data-value=\"longstrip\"]","label":"#number-panel ul li a[href*=\"/read/\"][data-number].active|attr:data-number","title":{"sel":"#ctrl-menu .head a","id":"body|attr:data-id","url":"|attr:href","name":"|text"},"chapter":{"sel":"#number-panel ul li a[href*=\"/read/\"][data-number]","label":"|attr:data-number","url":"|attr:href"}}},{"id":"webtoon","meta":{"releases":null,"titleBase":"","readerBase":"","searchBase":"search?keyword=","defaultLang":"en","chapters":"meta.reader","titleIdType":"id","trailing":false},"title":{"name":"h1.subj,.detail_info > p.subj,.info > h3.subj|text","img":"meta[property=\"og:image\"]|attr:content","tags":".info > h2.genre,.detail_info > p.genre,.info > p.genre|text","first":"a#_btnEpisode|attr:href","chapter":{"sel":"li._episodeItem","label":"|attr:data-episode-no","url":"a|attr:href","at":".date|text"}}},{"id":"mangareader","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#latest-chap .mls-wrap > .item","url":"a|attr:href","name":".manga-name a|text","chapter":{"sel":".fd-list .chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":"[data-manga-id]|attr:data-manga-id","name":"#ani_detail h2.manga-name|text","img":"#ani_detail img.manga-poster-img|attr:src","type":".anisc-info .item-head|row:type","tags":".anisc-detail .genres a|text","langs":"a.c-select-lang|attr:data-code","chapter":{"sel":".chapters-list-ul > ul > li","label":"|attr:data-number","url":"a|attr:href"}},"reader":{"content":"#main-wrapper","imgDivs":".iv-card[data-url]","lstrip":"a.active[data-value=\"vertical\"]","lstripBtn":".dropdown-menu a[data-value=\"vertical\"]","label":".reading-list .chapter-item.active|attr:data-number","title":{"id":"[data-manga-id]|attr:data-manga-id","sel":"#header a.hr-manga","name":"h2,.manga-name|text","url":"|attr:href"},"chapter":{"sel":".reading-list.active > .chapter-item","url":"a|attr:href","label":"|attr:data-number"}}},{"404":"#notfound .notfound-404","id":"mgeko","meta":{"releases":"jumbo/manga","titleBase":"manga","readerBase":"reader","searchBase":"search/?search=","defaultLang":"en","titleIdType":"slug","chapters":"meta.reader"},"releases":{"title":{"sel":"#latest-updates .novel-list.chapters > li > a","url":"|attr:href","name":"|attr:title","chapter":{"sel":"div:has(.chapter-title)","label":".chapter-title|text","at":".novel-stats span:first-child|text"}}},"title":{"name":".cover img|attr:alt","img":".cover img|[attr:data-src,attr-contain:src]","tags":".categories .property-item|text","first":"a#readchapterbtn|attr:href","chapter":{"sel":".chapter-list > li a","url":"|attr:href","label":".chapter-title|text","at":"time|attr:datetime"}},"reader":{"content":"#chapter-reader","label":".chapter-header .titles h2|text","next":"center .nextchap:not(.isDisabled)|attr:href","prev":"center .prevchap:not(.isDisabled)|attr:href","title":{"sel":".chapter-header .titles h1 a","name":"|text","url":"|attr:href"},"chapter":{"sel":"center center #cars option","label":"|text","url":"|attr:value"}}},{"404":"#main > .error-404","id":"mangack","meta":{"home":"home","releases":"updates","titleBase":"manga","readerBase":"chapter","searchBase":"?s=","defaultLang":"en","titleIdType":"slug","trailing":true},"releases":{"title":{"sel":".latestmanga .Latest_chapter_update","url":"a|attr:href","name":".latest-title a|text","chapter":{"sel":"tr:last-child center","label":"a|text","url":"a|attr:href","at":".chapter-date|text"}}},"title":{"id":"input[name=\"follow_manga\"]|attr:value","name":"h1.entry-title|text","img":".manga-cover-wrap img|attr:src","tags":".infobox a[href*=\"/genres/\"]|text","type":".infobox a[href*=\"/comic-type/\"]|text","chapter":{"sel":".chapterslist > li","url":"a|attr:href","label":"a|text","at":".entry-date|text"}},"reader":{"content":".entry-content","label":".entry-title|text","title":{"sel":".latest-title a","name":"|text","url":"|attr:href"},"prev":".prev-post a|attr:href","next":".next-post a|attr:href"}},{"id":"katana","meta":{"releases":"latest","titleBase":"manga","readerBase":"manga/{titleSlug}","searchBase":"?search_by=book_name&search=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#book_list > .item","id":"|attr:data-id","url":"a|attr:href","name":"a|text","chapter":{"sel":".chapter a","url":"|attr:href","label":"|text"}}},"title":{"id":".bookmark_bt[data-id]|attr:data-id","name":".info h1|text","img":".cover img|attr:src","tags":".info .genres a|text","chapter":{"sel":".chapters tbody > tr","url":"a|attr:href","label":"a|text","at":".update_time|text"}},"reader":{"content":"#imgs","label":"select[name=\"chapter_select\"] option[selected]|text","prev":".nav_button.prev:not([disabled])|attr:href","next":".nav_button.next:not([disabled])|attr:href","title":{"sel":"#breadcrumb_wrap li:nth-child(2) a","id":".bookmark_chapter_bt[data-id]|attr:data-id","name":"span|text","url":"|attr:href"},"chapter":{"sel":".nav_chapters_wrap:first-child select[name=\"chapter_select\"] option","url":"|attr:value","label":"|text"}}},{"id":"blogtruyen","meta":{"releases":null,"titleBase":"{id}","readerBase":"","searchBase":"timkiem/nangcao/1/0/-1/-1?txt=","defaultLang":"vi","titleIdType":"id"},"title":{"name":"h1.entry-title a|text","img":".thumbnail img|attr-contain:src","tags":".description .category a|attr:title","chapter":{"sel":"#list-chapters > p[id]","label":".title a|text","url":".title a|attr:href","at":".publishedDate|text"}},"reader":{"sel":"#readonline","content":"#readonline #content","label":"h1|text","prev":".linkchapter a:first-child:not([href=\"#\"])|attr:href","next":".linkchapter a:last-child:not([href=\"#\"])|attr:href","title":{"sel":".breadcrumbs a:nth-child(2)","name":"span|text","url":"|attr:href"},"chapter":{"sel":".linkchapter .ddlChapter option","label":"|text","url":"|attr:value"}}},{"id":"truyenqq","meta":{"releases":"","titleBase":"truyen-tranh","readerBase":"truyen-tranh","searchBase":"tim-kiem.html?q=","defaultLang":"vi","trailing":false,"titleIdType":"id"},"releases":{"title":{"sel":"#list_new > li","name":".book_name h3 a|text","url":".book_name h3 a|attr:href","chapter":{"sel":".last_chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":".btn-subscribe|attr:data-id","name":".book_info h1|text","img":".book_avatar img|attr-contain:src","tags":".book_info li a[href*=\"/the-loai/\"]|text","chapter":{"sel":".works-chapter-list .works-chapter-item","label":".name-chap a|text","url":".name-chap a|attr:href","at":".time-chap|text"}},"reader":{"content":".chapter_content","label":"ol.breadcrumb > li:last-of-type a span|text","prev":".chapter-control a.prev[href]:first-of-type:not(.d-none)|attr:href","next":".chapter-control a.prev[href]:last-of-type:not(.d-none), .chapter-control a.next[href]:not(.d-none)|attr:href","title":{"sel":"ol.breadcrumb > li:nth-of-type(2) a","id":".btn-subscribe|attr:data-id","name":"span|text","url":"|attr:href"},"chapter":{"trigger":".chapter_list","sel":"#popup_content .chapter-list > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#list_new > li","name":".book_name h3 a|text","url":".book_name h3 a|attr:href"}}},{"id":"uzay","meta":{"releases":"","titleBase":"manga/{id}","readerBase":"manga/{titleId}/{titleSlug}","searchBase":"search?search=","defaultLang":"tr","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"section[aria-label=\"new series\"] ~ section .header + div > div","url":"a|attr:href","name":"h2|text","chapter":{"sel":"a.mobile-list-item","url":"|attr:href","label":"h3 span:first-child b|text","at":"h3 span:nth-child(2)|text"}}},"title":{"name":".content-details > h1|text","img":".content-info > img|attr:src","tags":".content-details a[href*=\"?categories=\"]|text","chapter":{"sel":".list-episode > a","url":"|attr:href","label":"h3 b|text","at":"span:last-child|text"}},"reader":{"content":".manga-episode-card","label":".header h1 + h2|text","prev":"[aria-label=\"episode-navbar\"] div:not(last-child) > a[href]|attr:href","next":"[aria-label=\"episode-navbar\"] div:last-child > a[href]|attr:href","title":{"sel":".header h1:has(> a) a","url":"|attr:href","name":"|text"}}},{"id":"mangaworld","meta":{"releases":"","titleBase":"manga/{id}","readerBase":"manga/{titleId}/{titleSlug}/read","searchBase":"archive?keyword=","defaultLang":"it","titleIdType":"id"},"releases":{"title":{"sel":".comics-grid > .entry","name":".manga-title|text","url":"a|attr:href","chapter":{"sel":"div:has(> .xanh)","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h1.name|text","img":".thumb img|attr:src","tags":".meta-data a[href*=\"?genre=\"]|text","type":".meta-data a[href*=\"?type=\"]|text","chapter":{"sel":".chapters-wrapper .chapter > a","url":"|attr:href","label":"span|text","at":"i|text"}},"reader":{"content":"#page","label":"h1|text","lstrip":"select.mode option[value=\"LIST\"][selected]","lstripBtn":"select.mode option[value=\"LIST\"]","title":{"sel":"a[href*=\"/manga/\"]","name":"|text","url":"|attr:href"},"chapter":{"sel":"#controls-1 select.chapter option","label":"|text","url":"|value"}}},{"id":"mangaplus","meta":{"home":"updates","releases":"updates","titleBase":"titles","readerBase":"viewer","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"[class*=\"UpdatedTitle-module_titleWrapper_\"]","url":"a|attr:href","name":"[class*=\"UpdatedTitle-module_titleName_\"]|text","chapter":{"sel":"[class*=\"UpdatedTitle-module_chapterTitle_\"]","label":"|text"}}},"title":{"lazy":true,"sel":"h1[class*=\"TitleDetailHeader-module_title_\"]","name":"h1[class*=\"TitleDetailHeader-module_title_\"]|text","img":"img[class*=\"TitleDetailHeader-module_coverImage_\"]|attr:src","chapter":{"sel":"[class*=\"ChapterListItem-module_chapterListItem_\"]","url":"a[class*=\"ChapterListItem-module_commentContainer_\"]|attr:href","label":"[class*=\"ChapterListItem-module_name_\"]|text","at":"[class*=\"ChapterListItem-module_date_\"]|text"}},"reader":{"content":"[class*=\"Viewer-module_viewerContainer_\"]","label":"[class*=\"Navigation-module_chapterTitle_\"]|text","lstrip":"input#mode-vertical:checked","lstripBtn":"input#mode-vertical","title":{"sel":"a:has(> [class*=\"Navigation-module_title_\"])","url":"|attr:href","name":"h1|text"},"chapter":{"sel":"ul > li[class*=\"SideMenu-module_chapter_\"]","label":"|text"}}}]
1
+ [{"404":"img[src*=\"/images/error-message\"]","id":"asura","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}/chapter","searchBase":"series?page=1&name=","titleIdType":"name","defaultLang":"en","trailing":false},"releases":{"title":{"sel":"div:has(> a[href=\"/series\"]) + div > div > div > div:nth-child(2)","name":"span a|text","url":"span a|attr:href","chapter":{"sel":"div:has(> p):has(a)","url":"a[href*=\"/chapter/\"]|attr:href","label":"a[href*=\"/chapter/\"] p|text","at":"div + p|text"}}},"title":{"name":"div:has(> div a[href*=\"/sharer/\"]) span|text","img":"img[alt=\"poster\"]|attr-contain:src","type":"div:has(> img[alt=\"poster\"]) h3:first-child|row:type","tags":"div:has(> h3:first-child):has(> div:last-child:nth-child(2)) button|text","chapter":{"sel":"div:has(> h3 > a[href*=\"/chapter/\"])","url":"a|attr:href","label":"a|text","at":"h3:not(:first-child)|text"}},"reader":{"label":"h2|text","imgDivs":"div:has(> img[alt*=\"chapter\"])","content":"body","prev":"a[href*=\"/chapter/\"]:has(svg.lucide-chevron-left)|attr:href","next":"a[href*=\"/chapter/\"]:has(svg.lucide-chevron-right)|attr:href","title":{"sel":"a[href*=\"series/\"]:not([href$=\"series/\"]):not([href*=\"/chapter/\"])","name":"span|text","url":"|attr:href"},"chapter":{"trigger":"button:has(> h2)","sel":".dropdown-content > a","label":"h2|text","url":"|attr:href"}},"search":{"title":{"sel":"a[href*=\"series/\"]:not([href$=\"series/\"]):has(div span:first-child)","url":"|attr:href","name":"div:has(> span:first-child):has(> span:nth-child(3):last-child) span:first-child|text"}}},{"404":"#content > .wrapper > .notf img, body:empty","id":"mangastream","generic":true,"name":"meta[itemprop=\"name\"]|attr:content","meta":{"releases":"","titleBase":"series","readerBase":"","searchBase":"?s=","idBase":"?p=","titleIdType":"id","defaultLang":"en","trailing":true},"releases":{"title":{"sel":".listupd .utao .uta, .bixbox .bs.styletere","id":"a.series[rel]|attr:rel","name":"h4, .info .tt, .tt a, .series > h3|text","url":"a|attr:href","chapter":{"sel":".luf ul li, .chapter-list > a, .chfiv > li","label":"a, .epxs|text","url":"a|attr:href || |attr:href","at":"a + span, .expdate, .newchtimeluffy|text"}}},"title":{"sel":"#chapterlist > ul","id":".bookmark[data-id]|attr:data-id || #rating-form input[name=\"bs_table_id\"]|attr:value","name":"h1.entry-title|text","img":".thumb img|attr-contain:src","type":".imptdt a[href*=\"type=\"]|text || .imptdt:first-of-type i|text","tags":".postbody .mgen > a|text","chapter":{"sel":"#chapterlist > ul > li","url":"a|attr:href","label":".chapternum|text","at":".chapterdate|text"}},"reader":{"sel":"#readerarea","content":"#readerarea","id":".ctop option:selected|attr:data-id","label":"h1.entry-title|text","title":{"sel":".headpost .allc","name":"a|text","url":"a|attr:href"},"prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","chapter":{"sel":".ctop #chapter option:not([disabled]):not([value=\"\"])","id":"|attr:data-id","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".listupd .bsx","name":".bigor .tt|text","url":"a|attr:href"}}},{"404":".error-404.not-found","id":"madara","generic":true,"name":"a.logo|attr:title || meta[property=\"og:site_name\"]|attr:content","meta":{"releases":"","titleBase":"manga","readerBase":"manga/{titleSlug}","idBase":"?p=","searchBase":"?post_type=wp-manga&s=","defaultLang":"en","titleIdType":"id","trailing":true},"releases":{"title":{"sel":".page-listing-item .page-item-detail, .lastest-content .page-item-detail","id":"[data-post-id]|attr:data-post-id","name":"h3 a, .item-summary h3|text","url":"a|attr:href","chapter":{"sel":".chapter-item","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}},"title":{"sel":"body.manga-page","id":"#manga-chapters-holder|attr:data-id || .rating-post-id|attr:value || [data-action=\"bookmark\"]|attr:data-post","name":"h1|text","img":".summary_image .img-responsive, .summary_image img, .series-img img|[attr:data-src,attr-contain:src]","tags":"a[rel=\"tag\"][href*=\"genre\"],a[rel=\"tag\"][href*=\"tag\"],.genres-content|text","type":".post-content_item .summary-heading|row:type","chapter":{"sel":"li.wp-manga-chapter, .chapter-ul > li","url":"a|attr:href","label":"a, .chapter-title-date > p|text","at":".c-new-tag|attr:title || .chapter-release-date i|text"}},"reader":{"sel":".entry-content .read-container","content":".reading-content","label":".breadcrumb li.active|text","title":{"sel":".breadcrumb li:nth-last-of-type(2) a","id":"#manga-reading-nav-head|attr:data-id","name":"|text","url":"|attr:href"},"prev":"a.btn.prev_page|attr:href","next":"a.btn.next_page|attr:href","chapter":{"sel":"#manga-reading-nav-head select.single-chapter-select > option:not([disabled])","label":"|text","url":"|attr:data-redirect"}},"search":{"title":{"sel":".c-tabs-item__content","name":"h3 a|text","url":"a|attr:href","chapter":{"sel":".tab-meta","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}}},{"404":".elapi > a[href*=\"/search?q=\"]","id":"mangahub","meta":{"releases":"","titleBase":"manga","readerBase":"chapter/{titleSlug}","searchBase":"search?q=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":".list-group-item .media","name":"h4.media-heading a|text","url":".media-heading a|attr:href","at":".media-heading .small|text","chapter":{"sel":".media-body > a","label":"|text","url":"|attr:href"}}},"title":{"sel":"#chapters-tab .tab-content","name":"#mangadetail h1|text","img":"#mangadetail img.manga-thumb|attr-contain:src","tags":"#mangadetail a.genre-label|text","chapter":{"sel":"#chapters-tab li.list-group-item","label":"a:not([rel]) > span:first-child > span:first-child,a > span:first-child > span:first-child|text","url":"a:not([rel])|attr:href || a|attr:href","at":"small|text"}},"reader":{"content":"#mangareader .container-fluid, #mangareader","label":"h3|text","prev":".chapter-pager .previous a[href*=\"/chapter/\"]|attr:href","next":".chapter-pager .next a[href*=\"/chapter/\"]|attr:href","title":{"sel":"h3 a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pager-dropdown .dropdown-menu > li > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":".media-manga","name":"h4 a|text","url":"h4 a|attr:href","chapter":{"sel":".media-body","label":"a[href*=\"/chapter/\"]|text","url":"a[href*=\"/chapter/\"]|attr:href"}}}},{"id":"manga4life","meta":{"releases":"","titleBase":"manga","readerBase":"read-online","searchBase":"search/?name=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":".BoxBody.LatestChapters .Chapter","name":".Image > a|attr:title","url":".Image > a|attr:href","chapter":{"sel":".Label > a","label":".ChapterLabel|text","url":"|attr:href","at":".DateLabel|text"}}},"title":{"name":".BoxBody h1|text","img":"meta[property=\"og:image\"],meta[property=\"twitter:image:src\"]|attr:content","tags":"a[href*=\"search/?genre=\"]|text","type":"a[href*=\"search/?type=\"]|text"},"search":{"title":{"sel":".SearchFilterNav + .row > div[ng-repeat^=\"Series\"]","name":"div:nth-child(2) a.SeriesName|text","url":"a|attr:href"}}},{"id":"mangadex","meta":{"releases":"about:blank","titleBase":"title","readerBase":"chapter","searchBase":"titles?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"slug","trailing":false}},{"id":"comick","meta":{"home":"home","releases":"about:blank","titleBase":"comic","readerBase":"comic/{titleSlug}","searchBase":"search?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#updates-container div[title]","name":"|attr:title","url":"a[href^=\"/comic/\"]|attr:href","chapter":{"sel":"a:last-child","label":"div:first-child|text","url":"|attr:href","at":"div:nth-child(2)|text"}}},"title":{"name":"h1|text","img":"a[href$=\"/covers\"] > img,a[href$=\"/cover\"] > img|attr-contain:src","langs":"#chapter-header + div select option:not([value=\"\"]):not([value=\"all\"])|attr:value","tags":"table a.link[href^=\"/search?genres=\"]|text","type":"h1 ~ div.text-sm span:first-child|row:origination","first":"div:has(> a[href*=\"/comic/\"] + button) a|attr:href"},"reader":{"lazy":true,"sel":".reader-container","content":".reader-container","label":"select:first-of-type option[selected]|text","title":{"sel":"div > a[href*=\"/comic/\"]","name":"|text || img[alt]|attr:alt","url":"|attr:href"},"lang":"select:last-of-type|value","prev":".reader-container a:first-child[href^=\"/comic/\"]:not(:last-child)|attr:href","next":".reader-container a:last-child[href^=\"/comic/\"]|attr:href","chapter":{"sel":"select:first-of-type option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"id":"bato","meta":{"releases":"","titleBase":"series","readerBase":"chapter","searchBase":"search?word=","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"#series-list > .item","name":"a.item-title|text","url":"a.item-title|attr:href","lang":"em[data-lang]|attr:data-lang","chapter":{"sel":".item-volch","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h3.item-title a|text","img":".attr-cover > img|attr-contain:src","langs":".title-set em[data-lang]|attr:data-lang","tags":".attr-main .attr-item .text-muted|row:genres","chapter":{"sel":".episode-list > .main > .item","label":"a.chapt > b|text","url":"a.chapt|attr:href","at":".extra > i|text"}},"reader":{"content":"#viewer","label":"title|text","title":{"sel":"h3.nav-title a","name":"|text","url":"|attr:href"},"lang":"h3.nav-title em[data-lang]|attr:data-lang","prev":".nav-prev > a[href^=\"/chapter/\"]|attr:href","next":".nav-next > a[href^=\"/chapter/\"]|attr:href","chapter":{"sel":".nav-epis > select option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"404":"#error > .attention","id":"mangago","meta":{"releases":"list/latest","titleBase":"read-manga","readerBase":"read-manga/{titleSlug}","searchBase":"r/l_search/?name=","defaultLang":"en","titleIdType":"slug","trailing":true},"releases":{"title":{"sel":"ul#search_list > li > div","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}},"title":{"name":".w-title h1|text","img":".article .cover img,#information img|attr-contain:src","tags":".manga_right a[href*=\"/genre/\"],.manga_info ul.uk-list a[href*=\"/genre/\"]|text","chapter":{"sel":"#chapter_table tbody tr, table.uk-table tbody tr","label":"h4 a b, a.chico b|text || a.chico|text","url":"h4 a, a.chico|attr:href","at":"td:last-child|text"}},"reader":{"label":"#navi h3 span:last-child,#series + a.chapter|text","title":{"sel":"#navi a#series,#reader-nav .nav li:first-child a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pagebar.top ul.dropdown-menu.chapter > li > a,#series ~ ul.chapter li a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#search_list > li .box","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}}},{"404":".nf-large + .nf-desc + a[href=\"/home\"]","id":"kakalot","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#latest-chap .inner > .item","id":".item-info h3|attr:data-id","name":".item-info h3 a|text","url":"a|attr:href","chapter":{"sel":".chapter-list > .cl-item","label":"a.chapter-name|text","url":"a|attr:href","at":".time|text"}}},"title":{"lazy":true,"sel":"#chapt-list .cl-header","id":"#main|attr:data-id","name":".detail-box h3.manga-name|text","img":".detail-box .manga-poster-img|attr-contain:src","tags":".detail-box .line-content a[href*=\"/genre/\"]|text","langs":"#chap-lang .lang-item|attr:data-code","chapter":{"sel":"#chapt-list .reading-list > .item","label":"a.chapter-name|text","url":"a.chapter-name|attr:href","at":".item-time|text"}},"reader":{"content":"#list-image","imgDivs":".card-wrap[data-url]","label":".breadcrumb-item.active|text","title":{"sel":".breadcrumb-item:nth-child(2) a","id":"#reading|attr:data-manga-id","name":"|text","url":"|attr:href"},"chapter":{"sel":".kbreadcrumb + .reading-option option.reading-item","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".manga-list > .inner > .item","name":".manga-name a|attr:title","url":".manga-name a|attr:href","chapter":{"sel":".latest-chapter .chapter-name","label":"|text","url":"|attr:href"}}}},{"id":"reaper","meta":{"releases":"latest/comics","titleBase":"series","readerBase":"series/{titleSlug}/chapters","searchBase":"?s=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"h5 + div > div > div:has(> a h5)","name":"a h5|text","url":"a|attr:href","chapter":{"sel":"div > a","url":"|attr:href","label":"span:first-child|text","at":"span:last-child|text"}}},"title":{"lazy":true,"sel":"[aria-labelledby*=\"chapters_list\"] div > ul","name":"h1|text","img":"main .container img[alt]|attr-contain:src","first":"#content a:first-child:has(> button)|attr:href","chapter":{"sel":"[aria-labelledby*=\"chapters_list\"] ul > a","url":"|attr:href","label":"div:has(> span):not(:has(div))|text","at":"div + span|text"}},"reader":{"content":"#content","label":"h1|text","prev":"#content nav > div > div:first-child a|attr:href","next":"#content nav > div > div:last-child a|attr:href","title":{"sel":"#content","url":"a:has(svg[data-icon=\"house\"])|attr:href","name":"h2|text"}}},{"id":"tapas","meta":{"releases":null,"titleBase":"series/{slug}/info","readerBase":"episode","searchBase":"search?q=","defaultLang":"en","titleIdType":"id","chapters":"about:blank","trailing":false},"title":{"id":".button--subscribe|attr:data-tiara-event-meta-series-id","name":".info .title|text","img":".thumb img|attr:src","first":".episode-list__item a|attr:href","chapter":{"sel":".episode-list .episode-list__item > a","url":"|attr:data-id","label":"|attr:data-scene-number"}},"reader":{"content":".viewer__body","id":"div[id^=\"episode-\"][data-ep-id]|attr:data-ep-id","label":"div[id^=\"episode-\"][data-ep-scene]|attr:data-ep-scene","prev":"div[data-prev-id]:not([data-prev-id=\"-1\"])|attr:data-prev-id","next":"div[data-next-id]:not([data-next-id=\"-1\"])|attr:data-next-id","title":{"sel":"body","id":".subscribe-btn|attr:data-id","url":".subscribe-btn|attr:data-id","name":".series-info .title|text","img":".series-info .thumb img|attr:src"},"chapter":{"sel":".episode-list .list-body > li[data-id]","url":"|attr:data-id","label":".info__label|text"}}},{"id":"mangafire","meta":{"home":"home","releases":"updated","titleBase":"manga","readerBase":"read/{titleSlug}/{lang}","searchBase":"filter?keyword=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".unit > .inner","id":"a[data-tip]|attr:data-tip","name":".info a|text","url":"a|attr:href","chapter":{"sel":"ul.content li a","label":"span:first-child|text","url":"|attr:href","at":"span:last-child"}}},"title":{"id":".bookmark[data-id]|attr:data-id","name":".info h1[itemprop=\"name\"]|text","img":".poster img|attr-contain:src","tags":"#info-rating a[href*=\"/genre/\"]|text","langs":".tab-content[data-name=\"chapter\"] a.dropdown-item[data-code]|attr:data-code","chapter":{"sel":".tab-content[data-name=\"chapter\"] li.item[data-number]","url":"a|attr:href","label":"|attr:data-number","at":"a span:last-child|text"}},"reader":{"content":"#page-wrapper","imgDivs":".page","lstrip":".setting-tab.page-layout [data-value=\"longstrip\"].active","lstripBtn":".setting-tab.page-layout [data-value=\"longstrip\"]","label":"#number-panel ul li a[href*=\"/read/\"][data-number].active|attr:data-number","title":{"sel":"#ctrl-menu .head a","id":"body|attr:data-id","url":"|attr:href","name":"|text"},"chapter":{"sel":"#number-panel ul li a[href*=\"/read/\"][data-number]","label":"|attr:data-number","url":"|attr:href"}}},{"id":"webtoon","meta":{"releases":null,"titleBase":"","readerBase":"","searchBase":"search?keyword=","defaultLang":"en","chapters":"meta.reader","titleIdType":"id","trailing":false},"title":{"name":"h1.subj,.detail_info > p.subj,.info > h3.subj|text","img":"meta[property=\"og:image\"]|attr:content","tags":".info > h2.genre,.detail_info > p.genre,.info > p.genre|text","first":"a#_btnEpisode|attr:href","chapter":{"sel":"li._episodeItem","label":"|attr:data-episode-no","url":"a|attr:href","at":".date|text"}}},{"id":"mangareader","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#latest-chap .mls-wrap > .item","url":"a|attr:href","name":".manga-name a|text","chapter":{"sel":".fd-list .chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":"[data-manga-id]|attr:data-manga-id","name":"#ani_detail h2.manga-name|text","img":"#ani_detail img.manga-poster-img|attr:src","type":".anisc-info .item-head|row:type","tags":".anisc-detail .genres a|text","langs":"a.c-select-lang|attr:data-code","chapter":{"sel":".chapters-list-ul > ul > li","label":"|attr:data-number","url":"a|attr:href"}},"reader":{"content":"#main-wrapper","imgDivs":".iv-card[data-url]","lstrip":"a.active[data-value=\"vertical\"]","lstripBtn":".dropdown-menu a[data-value=\"vertical\"]","label":".reading-list .chapter-item.active|attr:data-number","title":{"id":"[data-manga-id]|attr:data-manga-id","sel":"#header a.hr-manga","name":"h2,.manga-name|text","url":"|attr:href"},"chapter":{"sel":".reading-list.active > .chapter-item","url":"a|attr:href","label":"|attr:data-number"}}},{"404":"#notfound .notfound-404","id":"mgeko","meta":{"releases":"jumbo/manga","titleBase":"manga","readerBase":"reader","searchBase":"search/?search=","defaultLang":"en","titleIdType":"slug","chapters":"meta.reader"},"releases":{"title":{"sel":"#latest-updates .novel-list.chapters > li > a","url":"|attr:href","name":"|attr:title","chapter":{"sel":"div:has(.chapter-title)","label":".chapter-title|text","at":".novel-stats span:first-child|text"}}},"title":{"name":".cover img|attr:alt","img":".cover img|[attr:data-src,attr-contain:src]","tags":".categories .property-item|text","first":"a#readchapterbtn|attr:href","chapter":{"sel":".chapter-list > li a","url":"|attr:href","label":".chapter-title|text","at":"time|attr:datetime"}},"reader":{"content":"#chapter-reader","label":".chapter-header .titles h2|text","next":"center .nextchap:not(.isDisabled)|attr:href","prev":"center .prevchap:not(.isDisabled)|attr:href","title":{"sel":".chapter-header .titles h1 a","name":"|text","url":"|attr:href"},"chapter":{"sel":"center center #cars option","label":"|text","url":"|attr:value"}}},{"404":"#main > .error-404","id":"mangack","meta":{"home":"home","releases":"updates","titleBase":"manga","readerBase":"chapter","searchBase":"?s=","defaultLang":"en","titleIdType":"slug","trailing":true},"releases":{"title":{"sel":".latestmanga .Latest_chapter_update","url":"a|attr:href","name":".latest-title a|text","chapter":{"sel":"tr:last-child center","label":"a|text","url":"a|attr:href","at":".chapter-date|text"}}},"title":{"id":"input[name=\"follow_manga\"]|attr:value","name":"h1.entry-title|text","img":".manga-cover-wrap img|attr:src","tags":".infobox a[href*=\"/genres/\"]|text","type":".infobox a[href*=\"/comic-type/\"]|text","chapter":{"sel":".chapterslist > li","url":"a|attr:href","label":"a|text","at":".entry-date|text"}},"reader":{"content":".entry-content","label":".entry-title|text","title":{"sel":".latest-title a","name":"|text","url":"|attr:href"},"prev":".prev-post a|attr:href","next":".next-post a|attr:href"}},{"id":"katana","meta":{"releases":"latest","titleBase":"manga","readerBase":"manga/{titleSlug}","searchBase":"?search_by=book_name&search=","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"#book_list > .item","id":"|attr:data-id","url":"a|attr:href","name":"a|text","chapter":{"sel":".chapter a","url":"|attr:href","label":"|text"}}},"title":{"id":".bookmark_bt[data-id]|attr:data-id","name":".info h1|text","img":".cover img|attr:src","tags":".info .genres a|text","chapter":{"sel":".chapters tbody > tr","url":"a|attr:href","label":"a|text","at":".update_time|text"}},"reader":{"content":"#imgs","label":"select[name=\"chapter_select\"] option[selected]|text","prev":".nav_button.prev:not([disabled])|attr:href","next":".nav_button.next:not([disabled])|attr:href","title":{"sel":"#breadcrumb_wrap li:nth-child(2) a","id":".bookmark_chapter_bt[data-id]|attr:data-id","name":"span|text","url":"|attr:href"},"chapter":{"sel":".nav_chapters_wrap:first-child select[name=\"chapter_select\"] option","url":"|attr:value","label":"|text"}}},{"id":"blogtruyen","meta":{"releases":null,"titleBase":"{id}","readerBase":"","searchBase":"timkiem/nangcao/1/0/-1/-1?txt=","defaultLang":"vi","titleIdType":"id"},"title":{"name":"h1.entry-title a|text","img":".thumbnail img|attr-contain:src","tags":".description .category a|attr:title","chapter":{"sel":"#list-chapters > p[id]","label":".title a|text","url":".title a|attr:href","at":".publishedDate|text"}},"reader":{"sel":"#readonline","content":"#readonline #content","label":"h1|text","prev":".linkchapter a:first-child:not([href=\"#\"])|attr:href","next":".linkchapter a:last-child:not([href=\"#\"])|attr:href","title":{"sel":".breadcrumbs a:nth-child(2)","name":"span|text","url":"|attr:href"},"chapter":{"sel":".linkchapter .ddlChapter option","label":"|text","url":"|attr:value"}}},{"id":"truyenqq","meta":{"releases":"","titleBase":"truyen-tranh","readerBase":"truyen-tranh","searchBase":"tim-kiem.html?q=","defaultLang":"vi","trailing":false,"titleIdType":"id"},"releases":{"title":{"sel":"#list_new > li","name":".book_name h3 a|text","url":".book_name h3 a|attr:href","chapter":{"sel":".last_chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":".btn-subscribe|attr:data-id","name":".book_info h1|text","img":".book_avatar img|attr-contain:src","tags":".book_info li a[href*=\"/the-loai/\"]|text","chapter":{"sel":".works-chapter-list .works-chapter-item","label":".name-chap a|text","url":".name-chap a|attr:href","at":".time-chap|text"}},"reader":{"content":".chapter_content","label":"ol.breadcrumb > li:last-of-type a span|text","prev":".chapter-control a.prev[href]:first-of-type:not(.d-none)|attr:href","next":".chapter-control a.prev[href]:last-of-type:not(.d-none), .chapter-control a.next[href]:not(.d-none)|attr:href","title":{"sel":"ol.breadcrumb > li:nth-of-type(2) a","id":".btn-subscribe|attr:data-id","name":"span|text","url":"|attr:href"},"chapter":{"trigger":".chapter_list","sel":"#popup_content .chapter-list > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#list_new > li","name":".book_name h3 a|text","url":".book_name h3 a|attr:href"}}},{"id":"uzay","meta":{"releases":"","titleBase":"manga/{id}","readerBase":"manga/{titleId}/{titleSlug}","searchBase":"search?search=","defaultLang":"tr","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"section[aria-label=\"new series\"] ~ section .header + div > div","url":"a|attr:href","name":"h2|text","chapter":{"sel":"a.mobile-list-item","url":"|attr:href","label":"h3 span:first-child b|text","at":"h3 span:nth-child(2)|text"}}},"title":{"name":".content-details > h1|text","img":".content-info > img|attr:src","tags":".content-details a[href*=\"?categories=\"]|text","chapter":{"sel":".list-episode > a","url":"|attr:href","label":"h3 b|text","at":"span:last-child|text"}},"reader":{"content":".manga-episode-card","label":".header h1 + h2|text","prev":"[aria-label=\"episode-navbar\"] div:not(last-child) > a[href]|attr:href","next":"[aria-label=\"episode-navbar\"] div:last-child > a[href]|attr:href","title":{"sel":".header h1:has(> a) a","url":"|attr:href","name":"|text"}}},{"id":"mangaworld","meta":{"releases":"","titleBase":"manga/{id}","readerBase":"manga/{titleId}/{titleSlug}/read","searchBase":"archive?keyword=","defaultLang":"it","titleIdType":"id"},"releases":{"title":{"sel":".comics-grid > .entry","name":".manga-title|text","url":"a|attr:href","chapter":{"sel":"div:has(> .xanh)","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h1.name|text","img":".thumb img|attr:src","tags":".meta-data a[href*=\"?genre=\"]|text","type":".meta-data a[href*=\"?type=\"]|text","chapter":{"sel":".chapters-wrapper .chapter > a","url":"|attr:href","label":"span|text","at":"i|text"}},"reader":{"content":"#page","label":"h1|text","lstrip":"select.mode option[value=\"LIST\"][selected]","lstripBtn":"select.mode option[value=\"LIST\"]","title":{"sel":"a[href*=\"/manga/\"]","name":"|text","url":"|attr:href"},"chapter":{"sel":"#controls-1 select.chapter option","label":"|text","url":"|value"}}},{"id":"mangaplus","meta":{"home":"updates","releases":"updates","titleBase":"titles","readerBase":"viewer","defaultLang":"en","titleIdType":"slug","trailing":false},"releases":{"title":{"sel":"[class*=\"UpdatedTitle-module_titleWrapper_\"]","url":"a|attr:href","name":"[class*=\"UpdatedTitle-module_titleName_\"]|text","chapter":{"sel":"[class*=\"UpdatedTitle-module_chapterTitle_\"]","label":"|text"}}},"title":{"lazy":true,"sel":"h1[class*=\"TitleDetailHeader-module_title_\"]","name":"h1[class*=\"TitleDetailHeader-module_title_\"]|text","img":"img[class*=\"TitleDetailHeader-module_coverImage_\"]|attr:src","chapter":{"sel":"[class*=\"ChapterListItem-module_chapterListItem_\"]","url":"a[class*=\"ChapterListItem-module_commentContainer_\"]|attr:href","label":"[class*=\"ChapterListItem-module_name_\"]|text","at":"[class*=\"ChapterListItem-module_date_\"]|text"}},"reader":{"content":"[class*=\"Viewer-module_viewerContainer_\"]","label":"[class*=\"Navigation-module_chapterTitle_\"]|text","lstrip":"input#mode-vertical:checked","lstripBtn":"input#mode-vertical","title":{"sel":"a:has(> [class*=\"Navigation-module_title_\"])","url":"|attr:href","name":"h1|text"},"chapter":{"sel":"ul > li[class*=\"SideMenu-module_chapter_\"]","label":"|text"}}}]