trackkun-dom 1.11.2 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
- package/specs.json +1 -1
- package/webview.js +1 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(B,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(B=typeof globalThis<"u"?globalThis:B||self,N(B._trackkun_={}))})(this,function(B){"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 W(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 S(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?W(a)?.pathname:a.startsWith("//")?W(`https:${a}`)?.pathname:a}async function O(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 O(a-1,e,t);s(n)},e)})}async function x(a,e,t=0){const r=e.root??document.documentElement,s=e.timeoutMs??1e4;return O(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})}async function Q(a,e=240){return new Promise(t=>{const r=new Image;r.crossOrigin="anonymous",r.onerror=()=>t(void 0),r.onload=()=>{const s=document.createElement("canvas"),n=s.getContext("2d"),i=Math.max(1,r.naturalWidth/e),o=r.naturalWidth/i,l=r.naturalHeight/i;s.width=o,s.height=l;const c=/iPad|iPhone|iPod/.test(navigator.userAgent);try{n.drawImage(r,0,0,o,l);const u=s.toDataURL(c?"image/jpg":"image/webp",c?.99:.8).split(",").slice(-1)[0];t(u)}catch{t(void 0)}},r.src=a})}const Y={text:_e,attr:ze,"attr-contain":Ae,value:ke,row:We,"bg-image":Ee};function h(a,e){if(a)return G(a,e,je)}function _(a,e){if(a)return G(a,e,Le)}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=Oe(s);if(!n)continue;const i=t(e??document.documentElement,n.selector,n.instructions);if(i)return i}}function Oe(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 je(a,e,t){if(!e)return Z(a,t);const r=e.split(",");for(const s of r){const n=Array.from(a.querySelectorAll(s));for(const i of n){const o=Z(i,t);if(o)return o}}}function Le(a,e,t){const r=e?Array.from(a.querySelectorAll(e)):[a],s=[];for(const n of r)for(const i of t){const o=Y[i.extractor],l=o(n,i.param);if(l){s.push(l);break}}if(s.length)return s}function Z(a,e){for(const t of e){const r=Y[t.extractor],s=r(a,t.param);if(s)return s}}function _e(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>j(e.textContent)).filter(Boolean).join(" ").trim()||j(a.textContent)}function ze(a,e){return j(a.getAttribute(e))}function Ae(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(s=>s.includes(e));r&&(t=a.getAttribute(r))}return j(t)}function ke(a){return a.value}function We(a,e){if(!e)return;const t=j(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return j(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function Ee(a){const e=getComputedStyle(a).backgroundImage;if(!(!e||!e.startsWith("url(")))return e.slice(5,-2)||void 0}function j(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var Ue=(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))(Ue||{}),qe=(a=>(a[a.ok=1]="ok",a[a.hidden=2]="hidden",a[a.deleted=3]="deleted",a))(qe||{}),Ve=(a=>(a[a.aggregator=0]="aggregator",a[a.scanlator=1]="scanlator",a))(Ve||{}),Fe=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Fe||{}),E=(a=>(a.id="id",a.name="name",a.slug="slug",a))(E||{}),A=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(A||{});const He=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,Je=/^S([1-9])\s/i,Qe=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?|capitolo\.?|capitulo\.?|bölüm\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,Ye=/\d+([_-~,.]\d+)?/,Ge=/[_-~,]/;function Ze(a){const e=a.match(He);if(e)return{volStr:e[0],volValueStr:e[4]};const t=a.match(Je);return t?{volStr:t[0],volValueStr:t[1]}:{}}function P(a){if(!a)return;if(!isNaN(+a))return{chap:+a};const{volStr:e,volValueStr:t}=Ze(a),r=e?a.replace(e,"").trim():a,s=r.match(Qe),n=r.match(Ye),i=s?.[6],o=i??n?.[0];if(!o)return;const l=+o.replace(Ge,".");return isNaN(l)?void 0:{vol:e&&t&&!isNaN(+t)&&a.indexOf(e)<a.indexOf(i?s[0]:n[0])?+t: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),Ke(a)}function Ke(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 Xe=[{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 K(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=Xe.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),o=X(i)??X(i,["a","an"]);if(!o)return;const l=r-o*n.seconds*1e3;return l>0?l:void 0}function X(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 ee(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 te(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 et(a,e){const t=[...e],r=[];let s=!1,n=0;const i=Math.min(a.length,100);for(let l=0;l<i;l++){if(n>=10/2){const d=10-r.length;if(d>0){const w=l+d<=a.length?a.slice(l,l+d):t.slice(0,d);r.push(...w)}break}const c=a[l],u=c.id!==void 0,g=t.findIndex(d=>u&&d.id===c.id||d.slug===c.slug||d.name==c.name),p=g===-1?void 0:t.splice(g,1)[0];!p||p.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 o=[];for(let l=0;l<r.length;l++){const c=r[l];(c.changed||l<10)&&o.push(c)}return{hasMore:e.length<2||e.length-t.length<2,rawReleases:o}}function tt(a,e){const t={};return a.forEach(r=>{const s=r.chapters.reduce((n,i)=>{const o=i.lang||e||"";return n[o]||(n[o]=[]),n[o].push(i),n},{});Object.entries(s).forEach(([n,i])=>{const o=`${r.slug}:${n}`;t[o]?(t[o].chapters.push(...i),z(t[o].chapters)):t[o]={...r,lang:n===""?void 0:n,chapters:i}})}),Object.values(t)}var $=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))($||{}),at=Object.defineProperty,rt=(a,e,t)=>e in a?at(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,D=(a,e,t)=>(rt(a,typeof e!="symbol"?e+"":e,t),t);class k{constructor(e){D(this,"siteId"),D(this,"spec"),D(this,"siteMeta"),D(this,"tags"),D(this,"context"),D(this,"methodsMap",{[$.title]:()=>this.getRawTitleData(),[$.reader]:()=>this.getRawReaderData(),[$.releases]:()=>this.getRawReleasesData(),[$.search]:()=>this.getRawSearchData(),[$.chapters]:()=>this.getRawChaptersData()}),D(this,"normalizedTagsMap"),this.siteId=e.siteId,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&&(e===$.title||e===$.reader)&&await nt(this.spec);if(t&&!r&&!s)return;const n=location.origin+location.pathname;return{type:e,is404:s,specId:this.spec.id,siteName:h(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),o=n.split("/").filter(Boolean);if(i.length<o.length){const l=o[i.indexOf("{lang}")],c=o[i.indexOf("{titleId}")],u=o[i.indexOf("{titleSlug}")],g=e.replace("{lang}",l).replace("{titleId}",c).replace("{titleSlug}",u);if(n.startsWith(g))return{basePath:g,lang:l.toLowerCase(),titleId:c,titleSlug:u,slug:n.replace(g,"")}}}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=S(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=tt(e.rawReleases,t);if(r.length)return this.context?.oldRawReleases?et(r,this.context.oldRawReleases):{rawReleases:r,hasMore:!0}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=st(this.tags)),r=e.map(s=>t[U(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 st(a){const e={};return a.forEach(({id:t,name:r,altNames:s})=>{e[U(r)]=t,s&&s.forEach(n=>{e[U(n)]=t})}),e}function U(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}async function nt(a){return it()===404||a[404]&&await x(a[404],{lazy:!0,timeoutMs:5e3})?!0:document.title.toLowerCase().includes("not found")}function it(){try{return window.performance.getEntries().find(a=>a.entryType==="navigation")?.responseStatus}catch{return}}class f extends k{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await x(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const s=r.slice(0,100).map(i=>{const o=h(t.url,i),l=S(o),c=h(t.name,i),u=h(t.at,i);if(!(!l||!c))return{titleEl:i,id:h(t.id,i),path:l,name:c,lang:h(t.lang,i)?.toLowerCase(),at:K(u,this.siteMeta.defaultLang)}}).filter(Boolean);if(!s.length)return;const n=[];return await Promise.all(s.map(async i=>{const{path:o,titleEl:l,lang:c,at:u,...g}=i,{id:p,slug:d}=this.parseTitleSlug(o);if(!d)return;const w=g.id||p,y=await this.getChapters(e,{root:l,titleId:w,titleSlug:d})??[];y.length&&n.push({slug:d,chapters:c||u?y.map(b=>({...b,elIndex:void 0,lang:b.lang??c,ts:b.ts??u})):y,...g,id:w})})),this.finalizeRawReleasesData({rawReleases:n})}getRawTitleData(){return this.getTitleData(this.spec.title)}async getTitleData(e){if(!e||(e.sel||e.lazy)&&!await x(e.sel??e.name,{lazy:!!e.lazy}))return;const t=h(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(p=>p.trim()).filter(Boolean));const i=h(e.type),o=_(e.langs)?.map(p=>p.toLowerCase()),l=r||h(e.id),c=await this.getChapters(e.chapter,{lazy:!0,titleId:l,titleSlug:s})??[],u=e.img?await this.getValidImgSrc(e.img):void 0,g=u&&this.context?.includeImgBytes?await Q(u):void 0;return{id:l||h(e.id),url:location.origin+location.pathname,slug:s,name:t,langs:o?.length?o: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:u,imgBytes:g,firstUrl:this.getFirstChapterUrl()}}getFirstChapterUrl(){const e=h(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 O(33,30,()=>{const t=h(e);return t&&!t.startsWith("data:")?t.split(" ")[0]:void 0})}getRawReaderTitleData(){const e=this.spec.reader?.title;if(!e)return;const t=e.sel?document.querySelector(e.sel)??void 0:void 0,r=h(e.name,t),s=h(e.url,t),{slug:n,id:i}=this.parseTitleSlug(s),o=ee(h(e.img,t));if(!(!r||!s||!n))return{name:r,img:o,url:s,slug:n,id:i||h(e.id)}}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await f.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await f.verifyImgsCotainer(r)))return;const s=this.getRawReaderTitleData();if(!s)return;const{id:n,slug:i}=s,o=!!this.context?.disableLazyChapters,l=!!this.context?.includeHiddenChapters,c=await this.getChapters(e.reader?.chapter,{titleId:n,titleSlug:i,lazy:l||!o,includeHiddenChapters:l,timeoutMs:l?3e3:12e4,includeIndex:!0})??[],u=h(e.reader.label)?.toLowerCase().replace(s.name.toLowerCase(),"");if(!u)return;const{vol:g,chap:p=0}=P(u)||{},{slug:d,basePath:w,lang:y,titleId:b}=this.parseReaderSlug(te(t.readerBase,{titleId:n,titleSlug:i}),location.pathname,location.href),v=e.reader?.chapter,m=this.findNeighborChapter({sel:e.reader.prev,basePath:w}),C=this.findNeighborChapter({sel:e.reader.next,basePath:w});return this.finalizeRawReaderData({vol:g,chap:p,lang:y??h(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0),slug:d,basePath:w,imgs:r?void 0:_(e.reader.imgs),title:{id:n||b||h(this.spec.reader?.title.id),url:s.url,slug:i,name:s.name,langs:y?[y]:void 0,img:s.img,chapters:c,hasMoreChapters:!!(v&&!c.length&&(v.trigger||m||C))}},{prevSlug:m,nextSlug:C})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===A.blank)return;const t=e===A.reader,r=!e||e===A.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,o=i?n.filter(l=>!l.lang||l.lang===i):n;return{chapters:o,title:s?{...s,chapters:[]}:await this.getTitleData(this.spec.chapters?.title),hasMore:!1,asc:!1,total:o.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=h(e.url,s),i=S(n),o=h(e.name,s),{slug:l,id:c}=this.parseTitleSlug(i);!i||!o||!l||r.push({id:c,slug:l,name:o,chapters:await this.getChapters(t,{root:s,titleId:c,titleSlug:l})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t,titleId:r="",titleSlug:s="",includeHiddenChapters:n=!1,lazy:i=!0,timeoutMs:o,includeIndex:l}={}){if(!e||!e.sel||!e.label)return;let c=null;if(e.trigger){if(!n||(c=document.querySelector(e.trigger),!c))return;c.click()}const u=[],g=await x(e.sel,{root:t,all:!0,lazy:i,timeoutMs:o});if(!g?.length)return c?.click(),[];const p=(g??[]).map((v,m)=>({id:h(e.id,v),label:h(e.label,v),url:h(e.url,v),at:h(e.at,v),elIndex:m}));c?.click();const d=p.map(({label:v})=>P(v)),w=d[1]?.chap;!d[0]&&(w===void 0||w<=1)&&(d[0]={chap:0});const{readerBase:y}=this.siteMeta,b=te(y,{titleId:r,titleSlug:s});return d.forEach((v,m)=>{if(!v)return;const{id:C,url:T,at:F,elIndex:H}=p[m],R={...v,id:C,ts:K(F,this.siteMeta.defaultLang)};l&&(R.elIndex=H);const Be=T?.startsWith("http")&&!T.includes(`//${location.hostname}/`),J=Be?T:S(T);if(!J){u.push(R);return}if(Be){u.push({...R,slug:J});return}const{slug:Ia,lang:Ca}=this.parseReaderSlug(b,J,T);u.push({...R,slug:Ia,lang:Ca})}),z(u)}static async isReaderPage(e){return!!e.sel&&!!await x(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 x(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=h(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const s=S(r);if(s)return this.parseReaderSlug(t,s,r).slug||void 0}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const s=e.title.chapters;if(!s.length){const c=e.title.hasMoreChapters?e:{...e,title:{...e.title,chapters:[{id:e.id,vol:e.vol,inferVol:e.inferVol,chap:e.chap,slug:e.slug,lang:e.lang}]}},u=P(t),g=P(r);return!u&&!g?c:{...c,prev:u?{...u,slug:t}:void 0,next:g?{...g,slug:r}:void 0}}let n,i,o,l;for(let c=0;c<s.length&&!(n&&(!t||o)&&!r&&l);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):!o&&t===u.slug?o=u:!l&&r===u.slug&&(l=u)}return i!==void 0&&(o??(o=s[i+1]),l??(l=s[i-1])),{...e,inferVol:n?.inferVol,prev:o,next:l}}}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,ct=(a,e,t)=>(lt(a,typeof e!="symbol"?e+"":e,t),t);class ae extends f{parseTitleSlug(e){return{slug:S(e)?.split("/").filter(Boolean)[1]}}}ct(ae,"specId","bato");function ut(){return Math.random().toString(16).slice(2)}async function gt({addListener:a,removeListener:e,transform:t,filter:r,handler:s,onTimeout:n,timeout:i,once:o}){return new Promise(l=>{a(g);const c=()=>o===!0&&e(g),u=i?setTimeout(()=>{c(),l(void 0),n?.()},i):void 0;async function g(p,...d){p=t?t(p):p,p!==void 0&&(!r||r(p,...d))&&(c(),l(p),s?.(p,...d),u&&clearTimeout(u))}})}async function ht(a){return(await gt({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function pt(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:s,args:n}=a,i={reqId:ut(),event:s,args:n};return(e||window)?.postMessage(i,r??"*"),(await ht({filter:o=>o?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const L={isAny:!0};function M(a,...e){return pt({event:"tk:fetchResult",args:{baseUrl:a,segments:e}})}var dt=Object.defineProperty,ft=(a,e,t)=>e in a?dt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,mt=(a,e,t)=>(ft(a,typeof e!="symbol"?e+"":e,t),t);const re=class Ne extends f{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:o,updated_at:l,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:o,ts:new Date(l).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await M(`https://api.${location.host}`,"comic",L,"chapters");if(!t)return e;const r=t.url.split("/").filter(Boolean).slice(-2)[0],s=se(t.value),n=h("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((o,l)=>o-l)),{...e,img:e.img??ee(h(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:Ne.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=se(await n.json());return i?{...i,lang:t,asc:!1}:void 0}catch{return}}};mt(re,"specId","comick");let wt=re;function se(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:o}=t,l=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof l!="number"||e.some(c=>c.vol==r&&c.chap===l&&c.lang===i)||e.push({slug:n,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:l,lang:i,ts:new Date(o).valueOf()})}),{chapters:z(e),total:a.total??e.length,hasMore:a.total>a.limit}}var vt=Object.defineProperty,yt=(a,e,t)=>e in a?vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,bt=(a,e,t)=>(yt(a,typeof e!="symbol"?e+"":e,t),t);class ne extends f{async getRawChaptersData(){const e=this.context?.titleSlug;if(!e)return;const t=`https://api.${location.host}/chapter/all/${e}`;return{chapters:(await(await fetch(t)).json()).map(Rt).filter(Boolean)}}}bt(ne,"specId","lua");function Rt(a){if(!a||typeof a.chapter_name!="string")return;const e=P(a.chapter_name);if(e)return{...e,slug:typeof a.chapter_slug=="string"?a.chapter_slug:void 0,ts:typeof a.created_at=="string"?new Date(a.created_at).valueOf():void 0}}function ie(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 $t=Object.defineProperty,St=(a,e,t)=>e in a?$t(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,xt=(a,e,t)=>(St(a,typeof e!="symbol"?e+"":e,t),t);class q extends f{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=oe(this.spec.reader?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(S(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawReaderData();if(r)return{...r,siteMeta:t}}async getRawSearchData(){const e=oe(this.spec.search?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(S(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=S(h(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 ie(e,"/").split("/").slice(0,-1).join("/")}}xt(q,"specId","madara");function oe(a){if(!a)return;const e=a.sel?document.querySelector(a.sel)??void 0:void 0;return h(a.url,e)}var Dt=Object.defineProperty,Mt=(a,e,t)=>e in a?Dt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,It=(a,e,t)=>(Mt(a,typeof e!="symbol"?e+"":e,t),t);class le extends f{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:[V(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:ce(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=V(e.CurChapter,r);return this.finalizeRawReaderData({chap:s.chap,slug:s.slug,imgs:Tt(e,t??void 0),basePath:"/"+this.siteMeta.readerBase.replace("{titleSlug}",r)+"/",title:{name:e.SeriesName,slug:r,url:`/${this.siteMeta.titleBase}/${r}`,chapters:ce(e,r),hasMoreChapters:!1}})}getVM(){return O(50,100,()=>window.angular?.element?.(document.documentElement)?.scope()?.vm)}}It(le,"specId","manga4life");function ce(a,e){return(a?.Chapters??a?.CHAPTERS??[]).sort((t,r)=>r.Chapter-t.Chapter).map(t=>V(t,e))}function V(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:Ct(a.Date)}}function Ct(a){const e=new Date(a).valueOf();return e===e?e:void 0}function Tt(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(o=>{const l=(o+"").padStart(3,"0");return`${i}${l}.${t}`})}catch{return}}var Pt=Object.defineProperty,Bt=(a,e,t)=>e in a?Pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Nt=(a,e,t)=>(Bt(a,typeof e!="symbol"?e+"":e,t),t);const Ot={a:.1,b:.2,c:.3,d:.4};class ue extends k{parseTitleSlug(e){return{slug:S(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:g})=>g==="manga"),o=I(s.volume),l=I(s.chapter);if(l===void 0)return;const{title:c}=i.attributes,u=c.en??Object.values(c)[0];t.push({slug:i.id,name:u,chapters:[{slug:s.externalUrl||n,vol:o,chap:l,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([M(e,L),M(e,L,"feed")]);if(!t||!r)return;const s=r.value.data?.map?.(l=>{const{attributes:c,id:u}=l;if(typeof c!="object"||typeof u!="string"||!u)return;const{externalUrl:g,title:p,volume:d,chapter:w,translatedLanguage:y}=c;return{slug:g||u,label:p||void 0,vol:I(d),chap:I(w),lang:y||"en",ts:new Date(c.readableAt).valueOf()}}).filter(l=>l?.chap!=null)??[],{data:n}=t.value;if(!n)return;const i=he({data:n,getTagIdsFromNames:l=>this.getTagIdsFromNames(l)});if(!i)return;const o=this.context?.includeImgBytes&&i.img?await Q(i.img):void 0;return{...i,imgBytes:o,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([M(e,"chapter",L),M(e,"at-home","server",L),M(e,"manga",L,"aggregate")]);if(!t||!r||!s)return;const n=t.value.data,{volume:i,chapter:o,externalUrl:l,translatedLanguage:c}=n.attributes||{},{baseUrl:u,chapter:{data:g,dataSaver:p,hash:d}}=r.value,w=n.relationships?.find?.(R=>R.type==="manga");if(!w)return;const y=he({data:w,getTagIdsFromNames:R=>this.getTagIdsFromNames(R)});if(!y||typeof s.value.volumes!="object")return;const b=ge(s.value)??[];(typeof o!="string"||o==="none")&&!b.length&&b.push({chap:0,slug:n.id});const v=b.findIndex(R=>R.slug===n.id),m=n.relationships?.find?.(R=>R.type==="scanlation_group"),C=u.endsWith("/")?u:u+"/",T=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),F=`${C}${T?"data-saver":"data"}/`,H=((T?p:g)??[]).map?.(R=>`${F}${d}/${R}`)??[];return{externalUrl:l,vol:I(i),inferVol:b[v]?.inferVol,chap:I(o)||0,imgs:H,lang:c,slug:n.id,prev:b[v+1],next:b[v-1],basePath:"/chapter/",groupName:m?.attributes?.name,groupUrl:m?.attributes?.website,isWebtoon:w?.attributes?.tags?.some(R=>R.attributes.name.en==="Long Strip"),title:{...y,chapters:b}}}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=ge(await s.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}Nt(ue,"specId","mangadex");function I(a){if(typeof a!="string"||a==="none")return;const e=parseFloat(a);if(e!==e)return;const t=a[a.length-1];return e+(Ot[t]??0)}function ge(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const s=I(t);return Object.values(r).map(({id:n,chapter:i})=>{const o=I(i);if(o!==void 0)return{vol:s,chap:o,slug:n}})}).flat().filter(Boolean).reverse();return z(e)}function he({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:o,tags:l,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 g=jt(),p=(i??[])?.map?.(m=>typeof m=="string"?m:void 0).filter(Boolean)??[],d=p.filter(m=>m&&(!g||g.includes(m))),w=o?.map?.(m=>{const[[,C]=[]]=Object.entries(m);return C}),y=s?.find?.(m=>m.type==="cover_art")?.attributes?.fileName,b=y?`https://mangadex.org/covers/${t}/${y}.256.jpg`:void 0,v=(l||[]).map(m=>m?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:w,langs:d.length>0?d:p.length>0?p:["en"],img:b,tags:e(v)}}function jt(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var Lt=Object.defineProperty,_t=(a,e,t)=>e in a?Lt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,zt=(a,e,t)=>(_t(a,typeof e!="symbol"?e+"":e,t),t);class pe extends f{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 x(".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 x(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await x(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}zt(pe,"specId","mangafire");var At=Object.defineProperty,kt=(a,e,t)=>e in a?At(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Wt=(a,e,t)=>(kt(a,typeof e!="symbol"?e+"":e,t),t);class de extends f{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 O(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(",")}}Wt(de,"specId","mangago");var Et=Object.defineProperty,Ut=(a,e,t)=>e in a?Et(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,qt=(a,e,t)=>(Ut(a,typeof e!="symbol"?e+"":e,t),t);class fe extends f{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]}))}}}qt(fe,"specId","mangaplus");var Vt=Object.defineProperty,Ft=(a,e,t)=>e in a?Vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ht=(a,e,t)=>(Ft(a,typeof e!="symbol"?e+"":e,t),t);class me extends f{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}))}}}Ht(me,"specId","mangareader");var Jt=Object.defineProperty,Qt=(a,e,t)=>e in a?Jt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Yt=(a,e,t)=>(Qt(a,typeof e!="symbol"?e+"":e,t),t);class we extends q{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(this.siteId==="realm"||!e)return;const r={...t,releases:ie(location.pathname,"/")},s=e.title,n=document.querySelector(s.sel)??void 0;if(!n)return;const i=S(h(s.url,n));if(i===void 0)return;const o=n.querySelector(s.chapter.sel)??void 0;if(!(!o||S(h(s.chapter.url,o))===void 0))return r.titleBase=this.extractBasePath(i),t.titleIdType===E.id&&(h(s.id,n)||(t.titleIdType=E.name)),this.finalizeNewSiteMeta(t,r)}finalizeNewSiteMeta(e,t){if(this.siteId==="realm")return;const r=Object.keys(t),s={...e};let n=!1;return r.forEach(i=>{const o=t[i];o!==e[i]&&(s[i]=o,n=!0)}),n?s:void 0}}Yt(we,"specId","mangastream");var Gt=Object.defineProperty,Zt=(a,e,t)=>e in a?Gt(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 ve extends f{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,name:e.title.name.replace("Ritorna a","").trim()}}}}Kt(ve,"specId","mangaworld");var Xt=Object.defineProperty,ea=(a,e,t)=>e in a?Xt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ta=(a,e,t)=>(ea(a,typeof e!="symbol"?e+"":e,t),t);class ye extends f{async getRawTitleData(){const e=await super.getRawTitleData();if(e)return{...e,hasMoreChapters:e.chapters.length===50}}}ta(ye,"specId","mgeko");var aa=Object.defineProperty,ra=(a,e,t)=>e in a?aa(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,sa=(a,e,t)=>(ra(a,typeof e!="symbol"?e+"":e,t),t);class be extends f{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await M(`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:o}=s;if(typeof n!="string"||typeof i!="string")return;const l=P(n);if(l?.chap)return{...l,slug:i,ts:o&&new Date(o).valueOf()||void 0}}),{chapters:r,hasMore:!1,asc:!1}}catch{return}}}sa(be,"specId","reaper");var na=Object.defineProperty,ia=(a,e,t)=>e in a?na(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,oa=(a,e,t)=>(ia(a,typeof e!="symbol"?e+"":e,t),t);class Re extends f{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 $e({...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:{...$e({...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 la(await n.json())}catch{return}}parseTitleSlug(e){if(!e)return{};const t=e.split("/").filter(Boolean);return{slug:t[1]??t[0]}}}oa(Re,"specId","tapas");function $e(a,e){const t=ca(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function la(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 ca(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var ua=Object.defineProperty,ga=(a,e,t)=>e in a?ua(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ha=(a,e,t)=>(ga(a,typeof e!="symbol"?e+"":e,t),t);class Se extends f{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:pa(t.slug)}))}}}ha(Se,"specId","truyenqq");function pa(a){return a.substring(a.lastIndexOf("-")+1).replace(".html","")||void 0}var da=Object.defineProperty,fa=(a,e,t)=>e in a?da(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ma=(a,e,t)=>(fa(a,typeof e!="symbol"?e+"":e,t),t);class xe extends f{async getRawTitleData(){const e=await super.getRawTitleData();return e?.img?{...e,img:wa(e.img)}:e}getRawReaderTitleData(){const e=super.getRawReaderTitleData();if(e)return{...e,name:e.name.split(" Chapter")[0]}}async getRawChaptersData(){const e=await this.getRawTitleData();if(!e)return;const t=M(location.origin,"api","chapters"),r=document.querySelector('button[data-key="chapters"]');if(!r)return;r.click();const s=setInterval(()=>r.click(),100),n=await t;if(clearInterval(s),!n?.value)return;const i=n.url.split("?")[1];if(!i)return;const o=new URLSearchParams(i).get("postId");if(!o)return;const l=n.value?.totalChapterCount;if(!l||l<50){const g=De(n.value);return g?{chapters:g,title:e,hasMore:!1,skip:0,total:l}:void 0}const c=await fetch(`${location.origin}/api/chapters?postId=${o}&skip=0&take=1000&order=desc`),u=De(await c.json());if(u)return{chapters:u,title:e,total:l,skip:0,hasMore:!1}}}ma(xe,"specId","vortex");function wa(a){try{return new URL(a,location.href).searchParams.get("url")||void 0}catch{return}}function De(a){const e=a?.post?.chapters;if(e)return e.map(t=>({slug:t.slug,chap:t.number,ts:t.createdAt?new Date(t.createdAt)?.valueOf?.():void 0})).filter(t=>t.slug&&typeof t.chap=="number")}var va=Object.defineProperty,ya=(a,e,t)=>e in a?va(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ba=(a,e,t)=>(ya(a,typeof e!="symbol"?e+"":e,t),t);class Me extends f{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=P(h(".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 o=location.pathname.split("/"),l=`${o.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:l}),u=o[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:l,slug:l,name:i,langs:[u],chapters:(c??[]).map(g=>({...g,lang:u})),hasMoreChapters:!1}}}async getReaderImgs(){const e=_("#_imageList img|[attr:data-url,attr:src]");return e?.length?e:await O(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=W(r);return{basePath:"",slug:s.pathname+s.search}}return{basePath:"",slug:r}}}ba(Me,"specId","webtoon");var Ra=Object.defineProperty,$a=(a,e,t)=>e in a?Ra(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Sa=(a,e,t)=>($a(a,typeof e!="symbol"?e+"":e,t),t);class Ie extends f{async getRawChaptersData(){const e=this.context?.rawId;if(!e)return;const t=await xa(e);if(!t)return;const r=document.createElement("DIV");r.innerHTML=t;const s=await this.getChapters({sel:'a[href*="/chapters/"]',url:"|attr:href",label:"span span|text",at:"time|attr:datetime"},{root:r,lazy:!0});if(s)return{chapters:s,hasMore:!1,asc:!1,total:s.length}}}Sa(Ie,"specId","weebcentral");async function xa(a){const e=`https://weebcentral.com/series/${a}/full-chapter-list`;try{return await(await fetch(e)).text()}catch{return}}const Da=[ae,wt,ne,q,le,ue,pe,de,fe,me,we,ve,ye,be,Re,xe,Se,Me,Ie];function Ce(a){const e=Da.find(t=>t.specId===a.spec.id)??f;return new e(a)}async function Ma(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:Te(t,e.generic);if(!r.length)return;const s=Ce({...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=Te(t.meta,t.generic);if(!r.length)return[];const s=Ce({...a,spec:t,siteMeta:t.meta});return r.map(n=>s.getRawPageByType(n,!0))}).flat())}function Te(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,s=location.pathname.split("/").filter(Boolean),n=Pe(s,r),i=Pe(s,t);if(n&&i)return[$.reader,$.title];const o=[];return!i&&(n!==!1||e)&&o.push($.reader),!n&&(i!==!1||e)&&o.push($.title),!o.length&&e?[$.reader,$.title]:o}function Pe(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 o=!1;for(let l=0;l<t.length;l++){const c=t[l];if(c[0]!=="{"){if(c!==a[l])return!1;o=!0}}if(o&&i===(n?0:1))return!0}B.PageType=$,B.scrape=Ma});
|
|
1
|
+
(function(B,O){typeof exports=="object"&&typeof module<"u"?O(exports):typeof define=="function"&&define.amd?define(["exports"],O):(B=typeof globalThis<"u"?globalThis:B||self,O(B._trackkun_={}))})(this,function(B){"use strict";function O(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 W(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 S(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?W(a)?.pathname:a.startsWith("//")?W(`https:${a}`)?.pathname:a}async function L(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 L(a-1,e,t);s(n)},e)})}async function $(a,e,t=0){const r=e.root??document.documentElement,s=e.timeoutMs??1e4;return L(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})}async function Q(a,e=240){return new Promise(t=>{const r=new Image;r.crossOrigin="anonymous",r.onerror=()=>t(void 0),r.onload=()=>{const s=document.createElement("canvas"),n=s.getContext("2d"),i=Math.max(1,r.naturalWidth/e),o=r.naturalWidth/i,l=r.naturalHeight/i;s.width=o,s.height=l;const c=/iPad|iPhone|iPod/.test(navigator.userAgent);try{n.drawImage(r,0,0,o,l);const u=s.toDataURL(c?"image/jpg":"image/webp",c?.99:.8).split(",").slice(-1)[0];t(u)}catch{t(void 0)}},r.src=a})}const J={text:je,attr:Ne,"attr-contain":Le,value:_e,row:ze,"bg-image":Ae};function g(a,e){if(a)return Y(a,e,Be)}function _(a,e){if(a)return Y(a,e,Oe)}function Y(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=Pe(s);if(!n)continue;const i=t(e??document.documentElement,n.selector,n.instructions);if(i)return i}}function Pe(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 Be(a,e,t){if(!e)return Z(a,t);const r=e.split(",");for(const s of r){const n=Array.from(a.querySelectorAll(s));for(const i of n){const o=Z(i,t);if(o)return o}}}function Oe(a,e,t){const r=e?Array.from(a.querySelectorAll(e)):[a],s=[];for(const n of r)for(const i of t){const o=J[i.extractor],l=o(n,i.param);if(l){s.push(l);break}}if(s.length)return s}function Z(a,e){for(const t of e){const r=J[t.extractor],s=r(a,t.param);if(s)return s}}function je(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>j(e.textContent)).filter(Boolean).join(" ").trim()||j(a.textContent)}function Ne(a,e){return j(a.getAttribute(e))}function Le(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(s=>s.includes(e));r&&(t=a.getAttribute(r))}return j(t)}function _e(a){return a.value}function ze(a,e){if(!e)return;const t=j(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return j(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function Ae(a){const e=getComputedStyle(a).backgroundImage;if(!(!e||!e.startsWith("url(")))return e.slice(5,-2)||void 0}function j(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var ke=(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))(ke||{}),We=(a=>(a[a.ok=1]="ok",a[a.hidden=2]="hidden",a[a.deleted=3]="deleted",a))(We||{}),Ee=(a=>(a[a.aggregator=0]="aggregator",a[a.scanlator=1]="scanlator",a))(Ee||{}),Ue=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Ue||{}),E=(a=>(a.id="id",a.name="name",a.slug="slug",a))(E||{}),A=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(A||{});const qe=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,Fe=/^S([1-9])\s/i,Ve=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?|capitolo\.?|capitulo\.?|bölüm\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,He=/\d+([_-~,.]\d+)?/,Qe=/[_-~,]/;function Je(a){const e=a.match(qe);if(e)return{volStr:e[0],volValueStr:e[4]};const t=a.match(Fe);return t?{volStr:t[0],volValueStr:t[1]}:{}}function C(a){if(!a)return;if(!isNaN(+a))return{chap:+a};const{volStr:e,volValueStr:t}=Je(a),r=e?a.replace(e,"").trim():a,s=r.match(Ve),n=r.match(He),i=s?.[6],o=i??n?.[0];if(!o)return;const l=+o.replace(Qe,".");return isNaN(l)?void 0:{vol:e&&t&&!isNaN(+t)&&a.indexOf(e)<a.indexOf(i?s[0]:n[0])?+t: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),Ye(a)}function Ye(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 Ze=[{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 G(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=Ze.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),o=K(i)??K(i,["a","an"]);if(!o)return;const l=r-o*n.seconds*1e3;return l>0?l: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 Ge(a,e){const t=[...e],r=[];let s=!1,n=0;const i=Math.min(a.length,100);for(let l=0;l<i;l++){if(n>=10/2){const h=10-r.length;if(h>0){const v=l+h<=a.length?a.slice(l,l+h):t.slice(0,h);r.push(...v)}break}const c=a[l],u=c.id!==void 0,p=t.findIndex(h=>u&&h.id===c.id||h.slug===c.slug||h.name==c.name),d=p===-1?void 0:t.splice(p,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 o=[];for(let l=0;l<r.length;l++){const c=r[l];(c.changed||l<10)&&o.push(c)}return{hasMore:e.length<2||e.length-t.length<2,rawReleases:o}}function Ke(a,e){const t={};return a.forEach(r=>{const s=r.chapters.reduce((n,i)=>{const o=i.lang||e||"";return n[o]||(n[o]=[]),n[o].push(i),n},{});Object.entries(s).forEach(([n,i])=>{const o=`${r.slug}:${n}`;t[o]?(t[o].chapters.push(...i),z(t[o].chapters)):t[o]={...r,lang:n===""?void 0:n,chapters:i}})}),Object.values(t)}var x=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))(x||{}),Xe=Object.defineProperty,et=(a,e,t)=>e in a?Xe(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,I=(a,e,t)=>(et(a,typeof e!="symbol"?e+"":e,t),t);class k{constructor(e){I(this,"siteId"),I(this,"spec"),I(this,"siteMeta"),I(this,"tags"),I(this,"context"),I(this,"methodsMap",{[x.title]:()=>this.getRawTitleData(),[x.reader]:()=>this.getRawReaderData(),[x.releases]:()=>this.getRawReleasesData(),[x.search]:()=>this.getRawSearchData(),[x.chapters]:()=>this.getRawChaptersData()}),I(this,"normalizedTagsMap"),this.siteId=e.siteId,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&&(e===x.title||e===x.reader)&&await at(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),o=n.split("/").filter(Boolean);if(i.length<o.length){const l=o[i.indexOf("{lang}")],c=o[i.indexOf("{titleId}")],u=o[i.indexOf("{titleSlug}")],p=e.replace("{lang}",l).replace("{titleId}",c).replace("{titleSlug}",u);if(n.startsWith(p))return{basePath:p,lang:l.toLowerCase(),titleId:c,titleSlug:u,slug:n.replace(p,"")}}}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=S(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=Ke(e.rawReleases,t);if(r.length)return this.context?.oldRawReleases?Ge(r,this.context.oldRawReleases):{rawReleases:r,hasMore:!0}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=tt(this.tags)),r=e.map(s=>t[U(s)]).filter(Boolean);return r.length===0?void 0:Array.from(new Set(r)).sort((s,n)=>s-n)}}I(k,"specId"),I(k,"siteId");function tt(a){const e={};return a.forEach(({id:t,name:r,altNames:s})=>{e[U(r)]=t,s&&s.forEach(n=>{e[U(n)]=t})}),e}function U(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}async function at(a){return rt()===404||a[404]&&await $(a[404],{lazy:!0,timeoutMs:5e3})?!0:document.title.toLowerCase().includes("not found")}function rt(){try{return window.performance.getEntries().find(a=>a.entryType==="navigation")?.responseStatus}catch{return}}class f extends k{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await $(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const s=r.slice(0,100).map(i=>{const o=g(t.url,i),l=S(o),c=g(t.name,i),u=g(t.at,i);if(!(!l||!c))return{titleEl:i,id:g(t.id,i),path:l,name:c,lang:g(t.lang,i)?.toLowerCase(),at:G(u,this.siteMeta.defaultLang)}}).filter(Boolean);if(!s.length)return;const n=[];return await Promise.all(s.map(async i=>{const{path:o,titleEl:l,lang:c,at:u,...p}=i,{id:d,slug:h}=this.parseTitleSlug(o);if(!h)return;const v=p.id||d,y=await this.getChapters(e,{root:l,titleId:v,titleSlug:h})??[];y.length&&n.push({slug:h,chapters:c||u?y.map(w=>({...w,elIndex:void 0,lang:w.lang??c,ts:w.ts??u})):y,...p,id:v})})),this.finalizeRawReleasesData({rawReleases:n})}getRawTitleData(){return this.getTitleData(this.spec.title)}async getTitleData(e){if(!e||(e.sel||e.lazy)&&!await $(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(d=>d.trim()).filter(Boolean));const i=g(e.type),o=_(e.langs)?.map(d=>d.toLowerCase()),l=r||g(e.id),c=await this.getChapters(e.chapter,{lazy:!0,titleId:l,titleSlug:s})??[],u=e.img?await this.getValidImgSrc(e.img):void 0,p=u&&this.context?.includeImgBytes?await Q(u):void 0;return{id:l||g(e.id),url:location.origin+location.pathname,slug:s,name:t,langs:o?.length?o: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:u,imgBytes:p,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 L(33,30,()=>{const t=g(e);return t&&!t.startsWith("data:")?t.split(" ")[0]:void 0})}getRawReaderTitleData(){const e=this.spec.reader?.title;if(!e)return;const t=e.sel?document.querySelector(e.sel)??void 0:void 0,r=g(e.name,t),s=g(e.url,t),{slug:n,id:i}=this.parseTitleSlug(s),o=X(g(e.img,t));if(!(!r||!s||!n))return{name:r,img:o,url:s,slug:n,id:i||g(e.id)}}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await f.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await f.verifyImgsCotainer(r)))return;const s=this.getRawReaderTitleData();if(!s)return;const{id:n,slug:i}=s,o=e.reader?.chapter,l=!!this.context?.disableLazyChapters,c=!!this.context?.includeHiddenChapters,u=await this.getChapters(o,{titleId:n,titleSlug:i,lazy:c||!l,includeHiddenChapters:c,timeoutMs:c?3e3:12e4,includeIndex:!0})??[],p=g(e.reader.label)?.toLowerCase().replace(s.name.toLowerCase(),"");if(!p)return;const{vol:d,chap:h=0}=C(p)||{},{slug:v,basePath:y,lang:w,titleId:b}=this.parseReaderSlug(ee(t.readerBase,{titleId:n,titleSlug:i}),location.pathname,location.href),m=this.findNeighborChapter({sel:e.reader.prev,basePath:y}),P=this.findNeighborChapter({sel:e.reader.next,basePath:y});return this.finalizeRawReaderData({vol:d,chap:h,lang:w??g(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0),slug:v,basePath:y,imgs:r?void 0:_(e.reader.imgs),title:{id:n||b||g(this.spec.reader?.title.id),url:s.url,slug:i,name:s.name,langs:w?[w]:void 0,img:s.img,chapters:u,hasMoreChapters:!u.length&&!c&&!!this.context?.disableLazyChapters&&!!o?.label}},{prevSlug:m,nextSlug:P})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===A.blank)return;const t=e===A.reader,r=!e||e===A.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,o=i?n.filter(l=>!l.lang||l.lang===i):n;return{chapters:o,title:s?{...s,chapters:[]}:await this.getTitleData(this.spec.chapters?.title),hasMore:!1,asc:!1,total:o.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=S(n),o=g(e.name,s),{slug:l,id:c}=this.parseTitleSlug(i);!i||!o||!l||r.push({id:c,slug:l,name:o,chapters:await this.getChapters(t,{root:s,titleId:c,titleSlug:l})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t,titleId:r="",titleSlug:s="",includeHiddenChapters:n=!1,lazy:i=!0,timeoutMs:o,includeIndex:l}={}){if(!e||!e.sel||!e.label)return;let c=null;if(e.trigger){if(!n||(c=document.querySelector(e.trigger),!c))return;c.click()}const u=[],p=await $(e.sel,{root:t,all:!0,lazy:i,timeoutMs:o});if(!p?.length)return c?.click(),[];const d=(p??[]).map((b,m)=>({id:g(e.id,b),label:g(e.label,b),url:g(e.url,b),at:g(e.at,b),elIndex:m}));c?.click();const h=d.map(({label:b})=>C(b)),v=h[1]?.chap;!h[0]&&(v===void 0||v<=1)&&(h[0]={chap:0});const{readerBase:y}=this.siteMeta,w=ee(y,{titleId:r,titleSlug:s});return h.forEach((b,m)=>{if(!b)return;const{id:P,url:T,at:F,elIndex:V}=d[m],R={...b,id:P,ts:G(F,this.siteMeta.defaultLang)};l&&(R.elIndex=V);const Te=T?.startsWith("http")&&!T.includes(`//${location.hostname}/`),H=Te?T:S(T);if(!H){u.push(R);return}if(Te){u.push({...R,slug:H});return}const{slug:ya,lang:ba}=this.parseReaderSlug(w,H,T);u.push({...R,slug:ya,lang:ba})}),z(u)}static async isReaderPage(e){return!!e.sel&&!!await $(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 $(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=g(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const s=S(r);if(s)return this.parseReaderSlug(t,s,r).slug||void 0}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const s=e.title.chapters;if(!s.length){const c=C(t),u=C(r);return!c&&!u?e:{...e,prev:c?{...c,slug:t}:void 0,next:u?{...u,slug:r}:void 0}}let n,i,o,l;for(let c=0;c<s.length&&!(n&&(!t||o)&&!r&&l);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):!o&&t===u.slug?o=u:!l&&r===u.slug&&(l=u)}return i!==void 0&&(o??(o=s[i+1]),l??(l=s[i-1])),{...e,inferVol:n?.inferVol,prev:o,next:l}}}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);class te extends f{parseTitleSlug(e){return{slug:S(e)?.split("/").filter(Boolean)[1]}}}it(te,"specId","bato");function ot(){return Math.random().toString(16).slice(2)}async function lt({addListener:a,removeListener:e,transform:t,filter:r,handler:s,onTimeout:n,timeout:i,once:o}){return new Promise(l=>{a(p);const c=()=>o===!0&&e(p),u=i?setTimeout(()=>{c(),l(void 0),n?.()},i):void 0;async function p(d,...h){d=t?t(d):d,d!==void 0&&(!r||r(d,...h))&&(c(),l(d),s?.(d,...h),u&&clearTimeout(u))}})}async function ct(a){return(await lt({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function ut(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:s,args:n}=a,i={reqId:ot(),event:s,args:n};return(e||window)?.postMessage(i,r??"*"),(await ct({filter:o=>o?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const N={isAny:!0};function M(a,...e){return ut({event:"tk:fetchResult",args:{baseUrl:a,segments: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,dt=(a,e,t)=>(pt(a,typeof e!="symbol"?e+"":e,t),t);const ae=class Ce extends f{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:o,updated_at:l,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:o,ts:new Date(l).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await M(`https://api.${location.host}`,"comic",N,"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((o,l)=>o-l)),{...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:Ce.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}}};dt(ae,"specId","comick");let ht=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:o}=t,l=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof l!="number"||e.some(c=>c.vol==r&&c.chap===l&&c.lang===i)||e.push({slug:n,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:l,lang:i,ts:new Date(o).valueOf()})}),{chapters:z(e),total:a.total??e.length,hasMore:a.total>a.limit}}var ft=Object.defineProperty,mt=(a,e,t)=>e in a?ft(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,wt=(a,e,t)=>(mt(a,typeof e!="symbol"?e+"":e,t),t);class se extends f{async getRawChaptersData(){const e=this.context?.titleSlug;if(!e)return;const t=`https://api.${location.host}/chapter/all/${e}`;return{chapters:(await(await fetch(t)).json()).map(vt).filter(Boolean)}}}wt(se,"specId","lua");function vt(a){if(!a||typeof a.chapter_name!="string")return;const e=C(a.chapter_name);if(e)return{...e,slug:typeof a.chapter_slug=="string"?a.chapter_slug:void 0,ts:typeof a.created_at=="string"?new Date(a.created_at).valueOf():void 0}}function ne(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 yt=Object.defineProperty,bt=(a,e,t)=>e in a?yt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Rt=(a,e,t)=>(bt(a,typeof e!="symbol"?e+"":e,t),t);class q extends f{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=ie(this.spec.reader?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(S(e))});this.siteMeta=t??this.siteMeta;const r=await super.getRawReaderData();if(r)return{...r,siteMeta:t}}async getRawSearchData(){const e=ie(this.spec.search?.title);if(!e)return;const t=this.finalizeNewSiteMeta(this.siteMeta,{titleBase:this.extractBasePath(S(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=S(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 ne(e,"/").split("/").slice(0,-1).join("/")}}Rt(q,"specId","madara");function ie(a){if(!a)return;const e=a.sel?document.querySelector(a.sel)??void 0:void 0;return g(a.url,e)}var xt=Object.defineProperty,St=(a,e,t)=>e in a?xt(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);const It={a:.1,b:.2,c:.3,d:.4};class oe extends k{parseTitleSlug(e){return{slug:S(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:p})=>p==="manga"),o=D(s.volume),l=D(s.chapter);if(l===void 0)return;const{title:c}=i.attributes,u=c.en??Object.values(c)[0];t.push({slug:i.id,name:u,chapters:[{slug:s.externalUrl||n,vol:o,chap:l,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([M(e,N),M(e,N,"feed")]);if(!t||!r)return;const s=r.value.data?.map?.(l=>{const{attributes:c,id:u}=l;if(typeof c!="object"||typeof u!="string"||!u)return;const{externalUrl:p,title:d,volume:h,chapter:v,translatedLanguage:y}=c;return{slug:p||u,label:d||void 0,vol:D(h),chap:D(v),lang:y||"en",ts:new Date(c.readableAt).valueOf()}}).filter(l=>l?.chap!=null)??[],{data:n}=t.value;if(!n)return;const i=ce({data:n,getTagIdsFromNames:l=>this.getTagIdsFromNames(l)});if(!i)return;const o=this.context?.includeImgBytes&&i.img?await Q(i.img):void 0;return{...i,imgBytes:o,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([M(e,"chapter",N),M(e,"at-home","server",N),M(e,"manga",N,"aggregate")]);if(!t||!r||!s)return;const n=t.value.data,{volume:i,chapter:o,externalUrl:l,translatedLanguage:c}=n.attributes||{},{baseUrl:u,chapter:{data:p,dataSaver:d,hash:h}}=r.value,v=n.relationships?.find?.(R=>R.type==="manga");if(!v)return;const y=ce({data:v,getTagIdsFromNames:R=>this.getTagIdsFromNames(R)});if(!y||typeof s.value.volumes!="object")return;const w=le(s.value)??[];(typeof o!="string"||o==="none")&&!w.length&&w.push({chap:0,slug:n.id});const b=w.findIndex(R=>R.slug===n.id),m=n.relationships?.find?.(R=>R.type==="scanlation_group"),P=u.endsWith("/")?u:u+"/",T=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),F=`${P}${T?"data-saver":"data"}/`,V=((T?d:p)??[]).map?.(R=>`${F}${h}/${R}`)??[];return{externalUrl:l,vol:D(i),inferVol:w[b]?.inferVol,chap:D(o)||0,imgs:V,lang:c,slug:n.id,prev:w[b+1],next:w[b-1],basePath:"/chapter/",groupName:m?.attributes?.name,groupUrl:m?.attributes?.website,isWebtoon:v?.attributes?.tags?.some(R=>R.attributes.name.en==="Long Strip"),title:{...y,chapters:w}}}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=le(await s.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}$t(oe,"specId","mangadex");function D(a){if(typeof a!="string"||a==="none")return;const e=parseFloat(a);if(e!==e)return;const t=a[a.length-1];return e+(It[t]??0)}function le(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const s=D(t);return Object.values(r).map(({id:n,chapter:i})=>{const o=D(i);if(o!==void 0)return{vol:s,chap:o,slug:n}})}).flat().filter(Boolean).reverse();return z(e)}function ce({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:o,tags:l,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 p=Mt(),d=(i??[])?.map?.(m=>typeof m=="string"?m:void 0).filter(Boolean)??[],h=d.filter(m=>m&&(!p||p.includes(m))),v=o?.map?.(m=>{const[[,P]=[]]=Object.entries(m);return P}),y=s?.find?.(m=>m.type==="cover_art")?.attributes?.fileName,w=y?`https://mangadex.org/covers/${t}/${y}.256.jpg`:void 0,b=(l||[]).map(m=>m?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:v,langs:h.length>0?h:d.length>0?d:["en"],img:w,tags:e(b)}}function Mt(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var Dt=Object.defineProperty,Tt=(a,e,t)=>e in a?Dt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ct=(a,e,t)=>(Tt(a,typeof e!="symbol"?e+"":e,t),t);class ue extends f{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 $(".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 $(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await $(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}Ct(ue,"specId","mangafire");var Pt=Object.defineProperty,Bt=(a,e,t)=>e in a?Pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Ot=(a,e,t)=>(Bt(a,typeof e!="symbol"?e+"":e,t),t);class ge extends f{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 L(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(",")}}Ot(ge,"specId","mangago");var jt=Object.defineProperty,Nt=(a,e,t)=>e in a?jt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Lt=(a,e,t)=>(Nt(a,typeof e!="symbol"?e+"":e,t),t);class pe extends f{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]}))}}}Lt(pe,"specId","mangaplus");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 de extends f{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}))}}}At(de,"specId","mangareader");var kt=Object.defineProperty,Wt=(a,e,t)=>e in a?kt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Et=(a,e,t)=>(Wt(a,typeof e!="symbol"?e+"":e,t),t);class he extends q{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(this.siteId==="realm"||!e)return;const r={...t,releases:ne(location.pathname,"/")},s=e.title,n=document.querySelector(s.sel)??void 0;if(!n)return;const i=S(g(s.url,n));if(i===void 0)return;const o=n.querySelector(s.chapter.sel)??void 0;if(!(!o||S(g(s.chapter.url,o))===void 0))return r.titleBase=this.extractBasePath(i),t.titleIdType===E.id&&(g(s.id,n)||(t.titleIdType=E.name)),this.finalizeNewSiteMeta(t,r)}finalizeNewSiteMeta(e,t){if(this.siteId==="realm")return;const r=Object.keys(t),s={...e};let n=!1;return r.forEach(i=>{const o=t[i];o!==e[i]&&(s[i]=o,n=!0)}),n?s:void 0}}Et(he,"specId","mangastream");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 fe extends f{async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:{...e.title,name:e.title.name.replace("Ritorna a","").trim()}}}}Ft(fe,"specId","mangaworld");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,Qt=(a,e,t)=>(Ht(a,typeof e!="symbol"?e+"":e,t),t);class me extends f{async getRawTitleData(){const e=await super.getRawTitleData();if(e)return{...e,hasMoreChapters:e.chapters.length===50}}}Qt(me,"specId","mgeko");var Jt=Object.defineProperty,Yt=(a,e,t)=>e in a?Jt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Zt=(a,e,t)=>(Yt(a,typeof e!="symbol"?e+"":e,t),t);class we extends f{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await M(`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:o}=s;if(typeof n!="string"||typeof i!="string")return;const l=C(n);if(l?.chap)return{...l,slug:i,ts:o&&new Date(o).valueOf()||void 0}}),{chapters:r,hasMore:!1,asc:!1}}catch{return}}}Zt(we,"specId","reaper");var Gt=Object.defineProperty,Kt=(a,e,t)=>e in a?Gt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Xt=(a,e,t)=>(Kt(a,typeof e!="symbol"?e+"":e,t),t);class ve extends f{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 ye({...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:{...ye({...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 ea(await n.json())}catch{return}}parseTitleSlug(e){if(!e)return{};const t=e.split("/").filter(Boolean);return{slug:t[1]??t[0]}}}Xt(ve,"specId","tapas");function ye(a,e){const t=ta(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function ea(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 ta(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var aa=Object.defineProperty,ra=(a,e,t)=>e in a?aa(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,sa=(a,e,t)=>(ra(a,typeof e!="symbol"?e+"":e,t),t);class be extends f{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:na(t.slug)}))}}}sa(be,"specId","truyenqq");function na(a){return a.substring(a.lastIndexOf("-")+1).replace(".html","")||void 0}var ia=Object.defineProperty,oa=(a,e,t)=>e in a?ia(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,la=(a,e,t)=>(oa(a,typeof e!="symbol"?e+"":e,t),t);class Re extends f{async getRawTitleData(){const e=await super.getRawTitleData();return e?.img?{...e,img:ca(e.img)}:e}getRawReaderTitleData(){const e=super.getRawReaderTitleData();if(e)return{...e,name:e.name.split(" Chapter")[0]}}async getRawChaptersData(){const e=await this.getRawTitleData();if(!e)return;const t=M(location.origin,"api","chapters"),r=document.querySelector('button[data-key="chapters"]');if(!r)return;r.click();const s=setInterval(()=>r.click(),100),n=await t;if(clearInterval(s),!n?.value)return;const i=n.url.split("?")[1];if(!i)return;const o=new URLSearchParams(i).get("postId");if(!o)return;const l=n.value?.totalChapterCount;if(!l||l<50){const p=xe(n.value);return p?{chapters:p,title:e,hasMore:!1,skip:0,total:l}:void 0}const c=await fetch(`${location.origin}/api/chapters?postId=${o}&skip=0&take=1000&order=desc`),u=xe(await c.json());if(u)return{chapters:u,title:e,total:l,skip:0,hasMore:!1}}}la(Re,"specId","vortex");function ca(a){try{return new URL(a,location.href).searchParams.get("url")||void 0}catch{return}}function xe(a){const e=a?.post?.chapters;if(e)return e.map(t=>({slug:t.slug,chap:t.number,ts:t.createdAt?new Date(t.createdAt)?.valueOf?.():void 0})).filter(t=>t.slug&&typeof t.chap=="number")}var ua=Object.defineProperty,ga=(a,e,t)=>e in a?ua(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,pa=(a,e,t)=>(ga(a,typeof e!="symbol"?e+"":e,t),t);class Se extends f{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=C(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 o=location.pathname.split("/"),l=`${o.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:l}),u=o[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:l,slug:l,name:i,langs:[u],chapters:(c??[]).map(p=>({...p,lang:u})),hasMoreChapters:!1}}}async getReaderImgs(){const e=_("#_imageList img|[attr:data-url,attr:src]");return e?.length?e:await L(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=W(r);return{basePath:"",slug:s.pathname+s.search}}return{basePath:"",slug:r}}}pa(Se,"specId","webtoon");var da=Object.defineProperty,ha=(a,e,t)=>e in a?da(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,fa=(a,e,t)=>(ha(a,typeof e!="symbol"?e+"":e,t),t);class $e extends f{async getRawChaptersData(){const e=this.context?.rawId;if(!e)return;const t=await ma(e);if(!t)return;const r=document.createElement("DIV");r.innerHTML=t;const s=await this.getChapters({sel:'a[href*="/chapters/"]',url:"|attr:href",label:"span span|text",at:"time|attr:datetime"},{root:r,lazy:!0});if(s)return{chapters:s,hasMore:!1,asc:!1,total:s.length}}}fa($e,"specId","weebcentral");async function ma(a){const e=`https://weebcentral.com/series/${a}/full-chapter-list`;try{return await(await fetch(e)).text()}catch{return}}const wa=[te,ht,se,q,oe,ue,ge,pe,de,he,fe,me,we,ve,Re,be,Se,$e];function Ie(a){const e=wa.find(t=>t.specId===a.spec.id)??f;return new e(a)}async function va(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:Me(t,e.generic);if(!r.length)return;const s=Ie({...a,spec:e,siteMeta:t});return await O(r.map(n=>s.getRawPageByType(n,r.length>1)))}return await O((a.genericSpecs??[]).map(t=>{const r=Me(t.meta,t.generic);if(!r.length)return[];const s=Ie({...a,spec:t,siteMeta:t.meta});return r.map(n=>s.getRawPageByType(n,!0))}).flat())}function Me(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,s=location.pathname.split("/").filter(Boolean),n=De(s,r),i=De(s,t);if(n&&i)return[x.reader,x.title];const o=[];return!i&&(n!==!1||e)&&o.push(x.reader),!n&&(i!==!1||e)&&o.push(x.title),!o.length&&e?[x.reader,x.title]:o}function De(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 o=!1;for(let l=0;l<t.length;l++){const c=t[l];if(c[0]!=="{"){if(c!==a[l])return!1;o=!0}}if(o&&i===(n?0:1))return!0}B.PageType=x,B.scrape=va});
|
package/package.json
CHANGED
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":"a[href*=\"/chapter/\"]:has(> h3)","url":"|attr:href","label":"h3|text","at":"h3:last-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 .fivchap, a, .epxs|text","url":"a|attr:href || |attr:href","at":"a .fivtime, 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 a, [itemprop=\"itemListElement\"] [content=\"2\"] ~ a","name":"|text","url":"|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,.chapter-number|text","at":"time|attr:datetime || .chapter-stats|text"}},"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, .chapter_list > option","label":"|text","url":"|attr:href || |attr:value"}},"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"}}},{"id":"flame","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}","searchBase":"browse?search=","defaultLang":"en","titleIdType":"name","trailing":false},"releases":{"title":{"sel":"[class*=\"SeriesCard_chapterCardContainer__\"]","url":"a|attr:href","name":".mantine-Stack-root a|text","chapter":{"sel":"a:has(> [class*=\"SeriesCard_chapterPillWrapper__\"])","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}}},"title":{"name":"h1|text","img":"img[alt=\"Cover\"]|attr:src","tags":"a[href*=\"/genre/\"] span|text","type":"p[class*=\"SeriesPage_infoField__\"]|row:type","first":".mantine-Paper-root p + a[href*=\"/series/\"]|attr:href","chapter":{"sel":"a[class*=\"ChapterCard_chapterWrapper__\"]","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}},"reader":{"content":"body","imgs":".mantine-Stack-root img","label":"p[class*=\"TopChapterNavbar_chapter_title___\"]|text","prevBtn":"button:has(.bi-arrow-left)","nextBtn":"button:has(.bi-arrow-right)","title":{"sel":"[class*=\"TopChapterNavbar_inner__\"]","name":"[class*=\"TopChapterNavbar_series_title__\"]|text","url":"a|attr:href"},"chapter":{"trigger":"button:has(.bi-card-list)","sel":"[class*=\"ChapterCard_chapterWrapper__\"]","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}}},{"id":"vortex","meta":{"home":"home","releases":null,"titleBase":"series","readerBase":"series/{titleSlug}","searchBase":"series?searchTerm=","defaultLang":"en","trailing":false,"titleIdType":"name"},"title":{"name":"h1[itemprop=\"name\"]|text","img":"[itemprop=\"image\"] img|attr:src","type":"h1:has(> svg)|row:type","first":"a[href*=\"/series/\"][href*=\"/chapter\"]|attr:href","hasMore":"a[href*=\"/series/\"][href*=\"/chapter\"]"},"reader":{"content":"section:has(> .chapter-image-container),body","label":"a[href*=\"/series\"]:has(img) div:has(~ time)|text","prev":"a:has(button[aria-label=\"Prev\"])|attr:href","next":"a:has(button[aria-label=\"Next\"])|attr:href","title":{"sel":"a[href*=\"/series\"]:has(img)","name":"div:has(~ time)|text","url":"|attr:href"}}},{"id":"weebcentral","meta":{"releases":"","titleBase":"series/{id}","readerBase":"chapters","chapters":"about:blank","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"[x-data*=\"sub_feed_shown\"] section article","url":"a:first-child|attr:href","name":"div:not(:has(span)) div|text","chapter":{"sel":"a:not(:first-child)","url":"|attr:href","label":"div:not(:first-child) span|text","at":"time|attr:datetime"}}},"title":{"name":"h1|text","img":"picture img|attr:src","tags":"li a[href*=\"?included_tag=\"]|text","type":"li a[href*=\"?included_type=\"]|text","hasMore":"#chapter-list a","first":"[x-data]:has(> a[href*=\"chapters/\"]):last-child a|attr:href"},"reader":{"content":"[hx-include*=\"reading_style\"]","label":"[hx-target=\"#chapter-select-body\"] span|text","lstripBtn":"input[value=\"long_strip\"]","lstrip":"input[value=\"long_strip\"]:checked","prevBtn":"button[\\@click=\"prevPage()\"]","nextBtn":"button[\\@click=\"nextPage()\"]","title":{"sel":"#nav-top a[href*=\"/series/\"]","url":"|attr:href","name":"span|text"},"chapter":{"trigger":"button[hx-target=\"#chapter-select-body\"]"}}},{"id":"lua","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}","titleIdType":"slug","trailing":false,"defaultLang":"en"},"releases":{"title":{"sel":"div:has(> div > a[href*=\"/series/\"]):has(a > h5)","url":"a|attr:href","name":"h5|text","chapter":{"sel":"a + div a","url":"|attr:href","label":"span:first-child|text","at":"span:not(:first-child)|text"}}},"title":{"lazy":true,"sel":"ul:has(> * > li)","name":"h1|text","img":"section:has(h1) img[srcset]|attr:src"},"reader":{"label":"h1|text","prev":"a[href*=\"/series/\"]:has(> button [data-icon=\"chevron-left\"])|attr:href","next":"a[href*=\"/series/\"]:has(> button [data-icon=\"chevron-right\"])|attr:href","content":"nav:first-child ~ .container:has(img)","title":{"sel":"nav:has(h1)","name":"h2|text","url":"nav:has(h1) a[href*=\"/series/\"]:has(svg[data-icon=\"house\"])|attr:href","img":"img|attr:src"}}},{"id":"rolia","meta":{"releases":"updated-mangas","titleBase":"manga","readerBase":"manga/{titleSlug}","chapters":"manga/{titleSlug}/chapterlist","searchBase":"?s=","titleIdType":"name","defaultLang":"en","trailing":true},"releases":{"title":{"sel":".article-feed > div > div:has(> h6)","name":"h6 a|text","url":"h6 a|attr:href","chapter":{"sel":"table tr","label":"a|text","url":"a|attr:href","at":"time|attr:data-date"}}},"title":{"name":"h1|text","img":"img.poster|attr-contain:src","tags":"a[href*=\"/genres/\"]|text","type":".card-movies-series table tr:last-child td|text","first":".chapter-list + a|attr:href","hasMore":".chapter-list ~ a[href*=\"/chapterlist\"]"},"chapters":{"chapter":{"sel":"#page-content-wrapper td:first-child a","url":"|attr:url","label":"|text"}},"reader":{"content":".manga-child-content","label":".childtitle|text","next":".chapter-nav-right|attr:href","prev":".chapter-nav-left|attr:href","title":{"sel":".breadcrumb strong a","name":"|text","url":"|attr:href"},"chapter":{"sel":"#postDropdown option:not(:first-child)","label":"|text","url":"|attr:value"}}}]
|
|
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":"a[href*=\"/chapter/\"]:has(> h3)","url":"|attr:href","label":"h3|text","at":"h3:last-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 .fivchap, a, .epxs|text","url":"a|attr:href || |attr:href","at":"a .fivtime, 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 a, [itemprop=\"itemListElement\"] [content=\"2\"] ~ a","name":"|text","url":"|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":"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,.chapter-number|text","at":"time|attr:datetime || .chapter-stats|text"}},"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, .chapter_list > option","label":"|text","url":"|attr:href || |attr:value"}},"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"}}},{"id":"flame","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}","searchBase":"browse?search=","defaultLang":"en","titleIdType":"name","trailing":false},"releases":{"title":{"sel":"[class*=\"SeriesCard_chapterCardContainer__\"]","url":"a|attr:href","name":".mantine-Stack-root a|text","chapter":{"sel":"a:has(> [class*=\"SeriesCard_chapterPillWrapper__\"])","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}}},"title":{"name":"h1|text","img":"img[alt=\"Cover\"]|attr:src","tags":"a[href*=\"/genre/\"] span|text","type":"p[class*=\"SeriesPage_infoField__\"]|row:type","first":".mantine-Paper-root p + a[href*=\"/series/\"]|attr:href","chapter":{"sel":"a[class*=\"ChapterCard_chapterWrapper__\"]","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}},"reader":{"content":"body","imgs":".mantine-Stack-root img","label":"p[class*=\"TopChapterNavbar_chapter_title___\"]|text","prevBtn":"button:has(.bi-arrow-left)","nextBtn":"button:has(.bi-arrow-right)","title":{"sel":"[class*=\"TopChapterNavbar_inner__\"]","name":"[class*=\"TopChapterNavbar_series_title__\"]|text","url":"a|attr:href"},"chapter":{"trigger":"button:has(.bi-card-list)","sel":"[class*=\"ChapterCard_chapterWrapper__\"]","url":"|attr:href","label":"p:first-child|text","at":"p:not(:first-child)|text"}}},{"id":"vortex","meta":{"home":"home","releases":null,"titleBase":"series","readerBase":"series/{titleSlug}","searchBase":"series?searchTerm=","defaultLang":"en","trailing":false,"titleIdType":"name"},"title":{"name":"h1[itemprop=\"name\"]|text","img":"[itemprop=\"image\"] img|attr:src","type":"h1:has(> svg)|row:type","first":"a[href*=\"/series/\"][href*=\"/chapter\"]|attr:href","hasMore":"a[href*=\"/series/\"][href*=\"/chapter\"]"},"reader":{"content":"section:has(> .chapter-image-container),body","label":"a[href*=\"/series\"]:has(img) div:has(~ time)|text","prev":"a:has(button[aria-label=\"Prev\"])|attr:href","next":"a:has(button[aria-label=\"Next\"])|attr:href","title":{"sel":"a[href*=\"/series\"]:has(img)","name":"div:has(~ time)|text","url":"|attr:href"}}},{"id":"weebcentral","meta":{"releases":"","titleBase":"series/{id}","readerBase":"chapters","chapters":"about:blank","defaultLang":"en","titleIdType":"id","trailing":false},"releases":{"title":{"sel":"[x-data*=\"sub_feed_shown\"] section article","url":"a:first-child|attr:href","name":"div:not(:has(span)) div|text","chapter":{"sel":"a:not(:first-child)","url":"|attr:href","label":"div:not(:first-child) span|text","at":"time|attr:datetime"}}},"title":{"name":"h1|text","img":"picture img|attr:src","tags":"li a[href*=\"?included_tag=\"]|text","type":"li a[href*=\"?included_type=\"]|text","hasMore":"#chapter-list a","first":"[x-data]:has(> a[href*=\"chapters/\"]):last-child a|attr:href"},"reader":{"content":"[hx-include*=\"reading_style\"]","label":"[hx-target=\"#chapter-select-body\"] span|text","lstripBtn":"input[value=\"long_strip\"]","lstrip":"input[value=\"long_strip\"]:checked","prevBtn":"button[\\@click=\"prevPage()\"]","nextBtn":"button[\\@click=\"nextPage()\"]","title":{"sel":"#nav-top a[href*=\"/series/\"]","url":"|attr:href","name":"span|text"},"chapter":{"trigger":"button[hx-target=\"#chapter-select-body\"]"}}},{"id":"lua","meta":{"releases":"","titleBase":"series","readerBase":"series/{titleSlug}","titleIdType":"slug","trailing":false,"defaultLang":"en"},"releases":{"title":{"sel":"div:has(> div > a[href*=\"/series/\"]):has(a > h5)","url":"a|attr:href","name":"h5|text","chapter":{"sel":"a + div a","url":"|attr:href","label":"span:first-child|text","at":"span:not(:first-child)|text"}}},"title":{"lazy":true,"sel":"ul:has(> * > li)","name":"h1|text","img":"section:has(h1) img[srcset]|attr:src"},"reader":{"label":"h1|text","prev":"a[href*=\"/series/\"]:has(> button [data-icon=\"chevron-left\"])|attr:href","next":"a[href*=\"/series/\"]:has(> button [data-icon=\"chevron-right\"])|attr:href","content":"nav:first-child ~ .container:has(img)","title":{"sel":"nav:has(h1)","name":"h2|text","url":"nav:has(h1) a[href*=\"/series/\"]:has(svg[data-icon=\"house\"])|attr:href","img":"img|attr:src"}}},{"id":"rolia","meta":{"releases":"updated-mangas","titleBase":"manga","readerBase":"manga/{titleSlug}","chapters":"manga/{titleSlug}/chapterlist","searchBase":"?s=","titleIdType":"name","defaultLang":"en","trailing":true},"releases":{"title":{"sel":".article-feed > div > div:has(> h6)","name":"h6 a|text","url":"h6 a|attr:href","chapter":{"sel":"table tr","label":"a|text","url":"a|attr:href","at":"time|attr:data-date"}}},"title":{"name":"h1|text","img":"img.poster|attr-contain:src","tags":"a[href*=\"/genres/\"]|text","type":".card-movies-series table tr:last-child td|text","first":".chapter-list + a|attr:href","hasMore":".chapter-list ~ a[href*=\"/chapterlist\"]"},"chapters":{"chapter":{"sel":"#page-content-wrapper td:first-child a","url":"|attr:url","label":"|text"}},"reader":{"content":".manga-child-content","label":".childtitle|text","next":".chapter-nav-right|attr:href","prev":".chapter-nav-left|attr:href","title":{"sel":".breadcrumb strong a","name":"|text","url":"|attr:href"},"chapter":{"sel":"#postDropdown option:not(:first-child)","label":"|text","url":"|attr:value"}}}]
|
package/webview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function
|
|
1
|
+
(function(){"use strict";function C(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e(),n=void 0},t)}}function m(e){return e.title==="Just a moment..."||e.title==="Access denied"||e.title=="Attention Required! | Cloudflare"||!!e.querySelector('body.no-js #challenge-running, body.no-js noscript, link[href$="/styles/challenges.css"]')}async function T({addListener:e,removeListener:t,transform:n,filter:o,handler:i,onTimeout:r,timeout:a,once:s}){return new Promise(c=>{e(k);const l=()=>s===!0&&t(k),b=a?setTimeout(()=>{l(),c(void 0),r?.()},a):void 0;async function k(d,...L){d=n?n(d):d,d!==void 0&&(!o||o(d,...L))&&(l(),c(d),i?.(d,...L),b&&clearTimeout(b))}})}async function E(e){return(await T({addListener:t=>window.addEventListener("message",t),removeListener:t=>window.removeEventListener("message",t),...e}))?.data}function H({event:e,filter:t,handler:n,senderWindow:o,targetOrigin:i}){E({filter:r=>r.data?.event===e&&!!r.data?.reqId&&(!t||t(r)),handler:async r=>{const a=await n?.(r);(o||window).postMessage({resId:r.data.reqId,result:a},i??"*")}})}async function h(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(i=>{setTimeout(async()=>{const r=await h(e-1,t,n);i(r)},t)})}function M(){const e={delay:{loading:!0}};let t=location.pathname,n={...e};async function o(i,r){if(!r.headers.get("Content-Type")?.includes("application/json")){delete n[i];return}n[i]={res:r.clone()}}window.fetch=new Proxy(window.fetch,{apply:async(i,r,a)=>{t!==location.pathname&&(t=location.pathname,n={...e});const[s,c]=a;return c?.method&&c.method.toLowerCase?.()!=="get"?await i.apply(r,a):(n[s]={loading:!0},delete n.delay,await i.apply(r,[s,c]).then(l=>(o(s,l),l)).catch(l=>{throw delete n[s],l}))}}),H({event:"tk:fetchResult",async handler(i){if(i.origin!==location.origin)return;const{baseUrl:r,segments:a}=i.data.args||{};return!Array.isArray(a)||typeof r!="string"?void 0:await I(()=>n,r,a.filter(s=>typeof s=="string"||typeof s?.isAny=="boolean"))}})}function A(e,t,n){const o=Object.keys(e).find(i=>_(i,t,n));return o?{url:o,result:e[o]}:void 0}function _(e,t,n){const o=e.replace(location.origin,""),i=t.replace(location.origin,"");if(!o.startsWith(i))return!1;const r=o.replace(i,"").split("?")[0].split("#")[0].split("/").filter(Boolean);return r.length===n.length&&n.every((a,s)=>a?.isAny||a===r[s])}function I(e,t,n){let o=15;return h(150,100,async i=>{const r=A(e(),t,n);if(!r){const s=Object.values(e());!(!s.length||s.some(c=>c.loading))&&!--o&&i();return}const a=await S(r.result);return a?{url:r.url,value:a}:void 0})}async function S(e){const{res:t,parsed:n,loading:o}=e;if(!o)return e.parsed=n??await t?.json().catch(async()=>JSON.parse(await t.text())).catch(()=>{}),delete e.res,e.parsed}const w=!navigator.userAgent.toLowerCase().includes("android"),y=location.hostname.includes("mangafire"),j=location.hostname.includes("mangahub");let f;window.top===window&&(w&&j&&(navigator.serviceWorker={addEventListener:()=>{}}),P(),D(),O(),M(),x());function D(){let e=!1,t=0;const n=()=>{if(!(e||m(document)))if(e=!0,t++,location.protocol==="chrome-error:")u("tk:error",document.title),document.body.style.setProperty("display","none");else{const o=g();u("tk:DOMContentLoaded",{isDocTransparent:o}),o&&q()}};document.addEventListener("DOMContentLoaded",n),document.addEventListener("readystatechange",o=>{o.target.readyState!=="loading"?n():t<=1&&(e=!1)})}function O(){e(()=>!m(document)&&u("tk:spaNav"));function e(t){let n=location.pathname;const o=C(()=>{n!==location.pathname&&(w&&y&&window.webkit&&(f=window.webkit,window.webkit=void 0),n=location.pathname,t())},50),i=(r,a,s)=>(o(),r.apply(a,s));window.addEventListener("popstate",o),window.history.pushState=new Proxy(window.history.pushState,{apply:i}),window.history.replaceState=new Proxy(window.history.replaceState,{apply:i})}}function P(){if(!w||!y)return W();window.addEventListener("DOMContentLoaded",()=>{f=window.webkit,window.webkit=void 0;const e={log:console.log,debug:console.debug,error:console.error,info:console.info,warn:console.warn};for(const t in e)console[t]=function(...n){try{e[t].call(null,n)}catch{}};window.flutter_inappwebview.callHandler=function(...t){const n=window._flutter_inappwebview_windowId,o=setTimeout(function(){});return f?.messageHandlers.callHandler.postMessage({handlerName:t[0],_callHandlerID:o,args:JSON.stringify(Array.prototype.slice.call(t,1)),_windowId:n}),new Promise(function(i,r){window.flutter_inappwebview[o]={resolve:i,reject:r}})}})}function W(){let e=window.webkit,t=0;const n=setInterval(()=>{if(e===window.webkit){++t>=300&&clearInterval(n);return}e===void 0||typeof window.webkit=="object"?(t=0,e=window.webkit):window.webkit=e},10)}function q(){let e=0;const t=setInterval(()=>{if(e++,e===10){clearInterval(t);return}g()||(clearInterval(t),u("tk:transparentChanged",!1))},200)}function g(){return v(document.documentElement)&&v(document.body)}function v(e){const t=getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"}function x(){let e;const t=()=>({});window._lstClckDetails=t,document.addEventListener("touchstart",n=>{const o=n.target;if(!(o instanceof HTMLElement)||!o.isConnected)return;const i=n.touches[0];window._lstClckDetails=()=>N(o,location.pathname,i.pageX,i.pageY),clearTimeout(e),o&&(e=setTimeout(()=>{window._lstClckDetails=t},500))})}function N(e,t,n,o){if(location.pathname!==t)return;const i=(e.isConnected?$(e,a=>a instanceof HTMLAnchorElement||a instanceof HTMLButtonElement):void 0)??Array.from(document.elementsFromPoint(n,o)).find(a=>a instanceof HTMLAnchorElement&&p(a));if(!i)return e.isConnected&&p(e)?{}:void 0;if(!p(i))return;if(!(i instanceof HTMLAnchorElement))return i.children.length?{}:void 0;const r=i.href;if(!r||r.includes("javascript:")||r[0]==="#")return{};try{return{href:new URL(r,location.href).toString(),isBlank:i.target==="_blank"}}catch{return{}}}function p(e){const{offsetWidth:t,offsetHeight:n}=e;return t>=1&&t<window.innerWidth*.9||n>=1&&n>window.innerHeight*.9}function $(e,t){let n=e;for(;n&&n!==document.body;){if(t(n))return n;n=n.parentElement}}function u(e,t){window.flutter_inappwebview?.callHandler?.(e,t===void 0?{}:t)}})();
|