var e=this&&this.__awaiter||function(e,t,a,s){return new(a||(a=Promise))(function(l,r){function i(e){try{n(s.next(e))}catch(e){r(e)}}function o(e){try{n(s.throw(e))}catch(e){r(e)}}function n(e){var t;e.done?l(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(i,o)}n((s=s.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var a,s,l,r={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=o(0),i.throw=o(1),i.return=o(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(o){return function(n){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;i&&(i=0,o[0]&&(r=0)),r;)try{if(a=1,s&&(l=2&o[0]?s.return:o[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,o[1])).done)return l;switch(s=0,l&&(o=[2&o[0],l.value]),o[0]){case 0:case 1:l=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,s=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(l=r.trys,(l=l.length>0&&l[l.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!l||o[1]>l[0]&&o[1](.*?)<\/title>/))||void 0===u?void 0:u[1])||void 0===v?void 0:v.trim(),this.getHostname(a)!=this.getHostname(o.url)||c&&("Bot Verification"==c||"You are being redirected..."==c||"Un instant..."==c||"Just a moment..."==c||"Redirecting..."==c))throw new Error("Captcha error, please open in webview (or the website has changed url)");return[2,n]}})})},n.prototype.parseNovels=function(e){var t=this;e=(0,a.load)(e).html();var s=[];return(e.match(//g)||[]).forEach(function(e){var a=e.match(/]*?src="([^"]*)"[^>]*?(?: data-src="([^"]*)")?[^>]*>/)||[],n=void 0;if(l.includes(t.site))n=l.replace(t.site,"");else{var c=l.split("/");c.shift(),c.shift(),c.shift(),n=c.join("/")}s.push({name:r,cover:o[2]||o[1]||i.defaultCover,path:n})}}),s},n.prototype.popularNovels=function(a,s){return e(this,arguments,void 0,function(e,a){var s,l,r,i,o,n,c,u,v,p=a.filters,h=a.showLatestNovels;return t(this,function(t){switch(t.label){case 0:for(r in s=null!==(v=null===(u=this.options)||void 0===u?void 0:u.seriesPath)&&void 0!==v?v:"/series/",l=this.site+s+"?page="+e,p||(p=this.filters||{}),h&&(l+="&order=latest"),p)if("object"==typeof p[r].value)for(i=0,o=p[r].value;i