/** * flixer - Built from src/flixer/ * Generated: 2026-07-19T17:05:50.362Z */ var se=Object.defineProperty,ie=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var K=(e,r,t)=>r in e?se(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,B=(e,r)=>{for(var t in r||(r={}))ae.call(r,t)&&K(e,t,r[t]);if(G)for(var t of G(r))le.call(r,t)&&K(e,t,r[t]);return e},S=(e,r)=>ie(e,ce(r));var m=(e,r,t)=>new Promise((n,o)=>{var c=a=>{try{i(t.next(a))}catch(h){o(h)}},s=a=>{try{i(t.throw(a))}catch(h){o(h)}},i=a=>a.done?n(a.value):Promise.resolve(a.value).then(c,s);i((t=t.apply(e,r)).next())});var $="https://flixer.gd",k="https://plsdontscrapemelove.flixer.gd",R={Accept:"text/plain",Origin:$,Referer:`${$}/`,"User-Agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"},b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(e){let r=[];for(let t=0;t=55296&&n<=56319&&t+1=56320&&o<=57343&&(n=65536+(n-55296<<10)+o-56320,t++)}n<128?r.push(n):n<2048?r.push(192|n>>6,128|n&63):n<65536?r.push(224|n>>12,128|n>>6&63,128|n&63):r.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|n&63)}return new Uint8Array(r)}function p(e,r){return e>>>r|e<<32-r}function E(e){let r=e.length*8,t=Math.ceil((e.length+9)/64)*64,n=new Uint8Array(t);n.set(e),n[e.length]=128;let o=Math.floor(r/4294967296),c=r>>>0,s=t-8;n[s]=o>>>24&255,n[s+1]=o>>>16&255,n[s+2]=o>>>8&255,n[s+3]=o&255,n[s+4]=c>>>24&255,n[s+5]=c>>>16&255,n[s+6]=c>>>8&255,n[s+7]=c&255;let i=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],a=new Uint32Array(64);for(let l=0;l>>0}for(let x=16;x<64;x++){let y=p(a[x-15],7)^p(a[x-15],18)^a[x-15]>>>3,L=p(a[x-2],17)^p(a[x-2],19)^a[x-2]>>>10;a[x]=a[x-16]+y+a[x-7]+L>>>0}let[A,w,C,d,f,u,g,U]=i;for(let x=0;x<64;x++){let y=p(f,6)^p(f,11)^p(f,25),L=f&u^~f&g,j=U+y+L+fe[x]+a[x]>>>0,ne=p(A,2)^p(A,13)^p(A,22),re=A&w^A&C^w&C,oe=ne+re>>>0;U=g,g=u,u=f,f=d+j>>>0,d=C,C=w,w=A,A=j+oe>>>0}i[0]=i[0]+A>>>0,i[1]=i[1]+w>>>0,i[2]=i[2]+C>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+f>>>0,i[5]=i[5]+u>>>0,i[6]=i[6]+g>>>0,i[7]=i[7]+U>>>0}let h=new Uint8Array(32);for(let l=0;l>>24&255,h[l*4+1]=i[l]>>>16&255,h[l*4+2]=i[l]>>>8&255,h[l*4+3]=i[l]&255;return h}function P(e,r){let t=e instanceof Uint8Array?e:v(String(e));t.length>64&&(t=E(t));let n=r instanceof Uint8Array?r:v(String(r)),o=new Uint8Array(64+n.length),c=new Uint8Array(96);for(let s=0;s<64;s++){let i=s>>18&63],r+=b[c>>>12&63],r+=n?b[c>>>6&63]:"=",r+=o?b[c&63]:"="}return r}function ue(){let e=new Uint8Array(16);for(let r=0;r>>10,56320|o&1023))}return r}function D(e,r){let t=0;for(let n=0;n<8;n++)r&1&&(t^=e),e=(e<<1^(e&128?283:0))&255,r>>>=1;return t}function me(e){if(!e)return 0;let r=1,t=e,n=254;for(;n;)n&1&&(r=D(r,t)),t=D(t,t),n>>>=1;return r}function M(e,r){return(e<>>8-r)&255}var F=(()=>{let e=new Uint8Array(256);for(let r=0;r<256;r++){let t=me(r);e[r]=t^M(t,1)^M(t,2)^M(t,3)^M(t,4)^99}return e})();function Ce(e){if(e.length!==32)throw new Error("Invalid AES-256 key");let r=new Uint32Array(60);for(let n=0;n<8;n++){let o=n*4;r[n]=(e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3])>>>0}let t=1;for(let n=8;n>>24)>>>0,o=(F[o>>>24]<<24|F[o>>>16&255]<<16|F[o>>>8&255]<<8|F[o&255])>>>0,o^=t<<24,t=(t<<1^(t&128?283:0))&255):n%8===4&&(o=(F[o>>>24]<<24|F[o>>>16&255]<<16|F[o>>>8&255]<<8|F[o&255])>>>0),r[n]=(r[n-8]^o)>>>0}return r}function W(e,r,t){for(let n=0;n<4;n++){let o=r[t*4+n];e[n*4]^=o>>>24,e[n*4+1]^=o>>>16&255,e[n*4+2]^=o>>>8&255,e[n*4+3]^=o&255}}function O(e,r){let t=new Uint8Array(e),n=new Uint8Array(16);W(t,r,0);for(let o=1;o<=14;o++){for(let c=0;c<16;c++)t[c]=F[t[c]];for(let c=0;c<4;c++)for(let s=0;s<4;s++)n[c+s*4]=t[c+(s+c&3)*4];if(t.set(n),o!==14)for(let c=0;c<4;c++){let s=c*4,i=t[s],a=t[s+1],h=t[s+2],l=t[s+3],A=i^a^h^l;t[s]^=A^D(i^a,2),t[s+1]^=A^D(a^h,2),t[s+2]^=A^D(h^l,2),t[s+3]^=A^D(l^i,2)}W(t,r,o)}return t}function X(e){let r=new Uint32Array(4);for(let t=0;t<4;t++){let n=t*4;r[t]=(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3])>>>0}return r}function we(e){let r=new Uint8Array(16);for(let t=0;t<4;t++)r[t*4]=e[t]>>>24,r[t*4+1]=e[t]>>>16&255,r[t*4+2]=e[t]>>>8&255,r[t*4+3]=e[t]&255;return r}function V(e,r){let t=new Uint32Array(4),n=new Uint32Array(r);for(let o=0;o<128;o++){if(e[o>>>5]>>>31-(o&31)&1)for(let s=0;s<4;s++)t[s]^=n[s];let c=n[3]&1;n[3]=(n[3]>>>1|(n[2]&1)<<31)>>>0,n[2]=(n[2]>>>1|(n[1]&1)<<31)>>>0,n[1]=(n[1]>>>1|(n[0]&1)<<31)>>>0,n[0]>>>=1,c&&(n[0]=(n[0]^3774873600)>>>0)}return t}function pe(e,r){let t=new Uint32Array(4);for(let i=0;i>>0),c.setUint32(8,Math.floor(o/4294967296));let s=X(n);for(let i=0;i<4;i++)t[i]^=s[i];return V(t,r)}function Fe(e){for(let r=15;r>=12&&(e[r]=e[r]+1&255,!e[r]);r--);}function ye(e,r){if(e.length<28)throw new Error("Invalid encrypted payload");let t=e.subarray(0,12),n=e.subarray(12,e.length-16),o=e.subarray(e.length-16),c=Ce(r),s=new Uint8Array(16),i=X(O(s,c)),a=new Uint8Array(16);a.set(t),a[15]=1;let h=we(pe(n,i)),l=O(a,c),A=0;for(let d=0;d<16;d++)A|=h[d]^l[d]^o[d];if(A)throw new Error("Invalid encrypted payload tag");let w=new Uint8Array(n.length),C=new Uint8Array(a);for(let d=0;dr.includes(t)).concat(r.filter(t=>!Z.includes(t)))}function De(e,r){if(e&&Array.isArray(e.sources)){let n=e.sources.find(o=>o&&String(o.server||"").toLowerCase()===r)||e.sources.find(o=>o&&o.url);return n&&typeof n.url=="string"?n.url.trim():""}if(e&&e.sources&&typeof e.sources=="object"){let t=e.sources.file||e.sources.url;return typeof t=="string"?t.trim():""}return""}function $e(e){let r=String(e).match(/(?:^|[^0-9])(2160|1440|1080|720|480|360)p?(?:[^0-9]|$)/i);return r?`${r[1]}p`:"Auto"}function be(e,r,t,n){return m(this,null,function*(){let o=yield H(t,r);return yield _(e,{headers:S(B({},o),{"X-Only-Sources":"1","X-Server":n})})})}function te(e,r,t,n){return m(this,null,function*(){let o=String(e||"").trim();if(r!=="movie"&&r!=="tv")return[];if(r==="tv"&&(!Number.isInteger(Number(t))||!Number.isInteger(Number(n))||Number(t)<1||Number(n)<1))return[];let c=yield Ue(o,r);if(!c)return[];J();let s=Q(),i=Se(c,r,Number(t),Number(n)),a=`${k}${i}`,h=yield H(s,i),l=yield _(a,{headers:S(B({},h),{bW90aGFmYWth:"1"})}),A=ve(yield ee(l,s)),w=yield Promise.all(A.map(f=>m(this,null,function*(){try{return{server:f,encrypted:yield be(a,i,s,f)}}catch(u){return console.warn(`[Flixer] ${f} request failed: ${u&&u.message?u.message:String(u)}`),{server:f,encrypted:""}}}))),C=[],d={};for(let f of w)if(f.encrypted)try{let u=De(yield ee(f.encrypted,s),f.server);if(!u||d[u])continue;d[u]=!0;let g=Ee[f.server]||f.server.charAt(0).toUpperCase()+f.server.slice(1),U=$e(u);C.push({name:`Flixer \xB7 ${g}`,title:`${g} \xB7 ${U}`,url:u,quality:U,headers:{Referer:`${$}/`,Origin:$,"User-Agent":R["User-Agent"]}})}catch(u){let g=u&&u.message?u.message:String(u);/^E5[678]$/.test(g)||console.warn(`[Flixer] ${f.server} decode failed: ${g}`)}return C})}function Re(e,r,t,n){return m(this,null,function*(){try{console.log(`[Flixer] Request: ${r} ${e}`);let o=yield te(e,r,t,n);return console.log(`[Flixer] Found ${o.length} stream(s)`),o}catch(o){return console.error(`[Flixer] Error: ${o.message}`),[]}})}module.exports={getStreams:Re};