PageSourceSearch

https://tacu.ai/_next/static/chunks/1087.3e5e91915b1937c2.js

js tacu.ai collected 2026-10-05 14:00:00 UTC 5,144 bytes, 2 lines download raw bytes

1/*! Third-party licenses and source code: https://tacu.ai/open-source-notices.txt */
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="24a9954c-ea6e-47e0-9282-1d35b1e56b65",e._sentryDebugIdIdentifier="sentry-dbid-24a9954c-ea6e-47e0-9282-1d35b1e56b65")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1087],{91087:(e,t,i)=>{i.d(t,{MP4Demuxer:()=>a});var s=i(38827),n=i(26590);class a{async init(e){if(this.initDone&&this.config)return this.config;let t=s.createFile();return this.mp4file=t,new Promise((i,n)=>{let a=!1;t.onReady=e=>{var l,r,o,h,d,u;let c=e.tracks.find(e=>e.video&&e.video.width>0);if(!c){a=!0,n(Error("[MP4Demuxer] No video track found"));return}let f=t.getTrackById(c.id),g=null==f||null==(d=f.mdia)||null==(h=d.minf)||null==(o=h.stbl)||null==(r=o.stsd)||null==(l=r.entries)?void 0:l[0],p=null!=(u=null==g?void 0:g.avcC)?u:null==g?void 0:g.hvcC,m=new Uint8Array(0);if(p){let e=new s.DataStream(void 0,0,s.DataStream.BIG_ENDIAN);p.write(e),m=new Uint8Array(e.buffer,8)}this.config={codec:c.codec,codedWidth:c.video.width,codedHeight:c.video.height,description:m,...Number.isFinite(c.duration)&&c.duration>0&&c.timescale>0?{durationSeconds:c.duration/c.timescale}:{},hasAudio:e.tracks.some(e=>!!e.audio)};let y=t.getTrackSamplesInfo(c.id);if(!(null==y?void 0:y.length)){a=!0,n(Error("[MP4Demuxer] Empty sample table"));return}this.samples=y.map(e=>{let{offset:t,size:i,cts:s,duration:n,timescale:a,is_sync:l}=e;return{offset:t,size:i,cts:s,duration:n,timescale:a,is_sync:l}}),this.buildGOPIndex(),this.initDone=!0,a=!0,this.mp4file=null,i(this.config)},t.onError=e=>{a||(a=!0,n(e))},this.fetchUntilReady(t,()=>a,e).catch(e=>{a||(a=!0,n(e))})})}hasGOPLoaded(e){let t=this.findGOPIndex(e);if(-1===t)return!1;let i=this.gopCache.get(t);return!!i&&i.length>=this.requiredSampleCount(t,e)}async loadGOPContaining(e){let t=this.findGOPIndex(e);if(-1===t)return[];let i=this.requiredSampleCount(t,e),s=this.generation;for(;s===this.generation;){var n;let e=null!=(n=this.gopCache.get(t))?n:[];if(e.length>=i)return this.gopCache.delete(t),this.gopCache.set(t,e),e.slice(0,i);let a=this.loadingGOPs.get(t);if(a){await a.catch(()=>{});continue}let l=this.gopIndex[t].slice(e.length,i).map(e=>this.samples[e]),r=this.fetchSamples(l).then(i=>{s===this.generation&&(this.gopCache.delete(t),this.gopCache.set(t,[...e,...i]),this.gopCache.size>6&&this.gopCache.delete(this.gopCache.keys().next().value))});this.loadingGOPs.set(t,r);try{await r}finally{s===this.generation&&this.loadingGOPs.delete(t)}}return[]}requiredSampleCount(e,t){let i=this.gopIndex[e],s=0,n=1/0;for(let e=0;e<i.length;e++){let a=this.samples[i[e]],l=Math.abs(a.cts/a.timescale*1e6-t);l<n&&(s=e,n=l)}return s+1}findGOPIndex(e){if(0===this.samples.length)return -1;let t=this.gopIndex.length-1;for(let i=0;i<this.gopIndex.length;i++){let s=this.gopIndex[i][0],n=this.samples[s];if(n.cts/n.timescale*1e6>e&&i>0){t=i-1;break}i===this.gopIndex.length-1&&(t=i)}return t}dispose(){this.generation+=1,this.gopCache.clear(),this.loadingGOPs.clear(),this.mp4file&&(this.mp4file.flush(),this.mp4file=null),this.samples=[],this.gopIndex=[],this.config=null,this.initDone=!1}buildGOPIndex(){this.gopIndex=[];let e=[];for(let t=0;t<this.samples.length;t++)this.samples[t].is_sync?(e.length>0&&this.gopIndex.push(e),e=[t]):e.push(t);e.length>0&&this.gopIndex.push(e)}async fetchSamples(e){let t=1/0,i=0;for(let s of e)t=Math.min(t,s.offset),i=Math.max(i,s.offset+s.size);let s=await fetch((0,n.l)(this.url)||this.url,{headers:{Range:"bytes=".concat(t,"-").concat(i-1)}});if(!s.ok&&206!==s.status)throw Error("[MP4Demuxer] Fetch failed: ".concat(s.status," ").concat(s.statusText));let a=await s.arrayBuffer(),l=200===s.status?0:t;return e.map(e=>{let t=e.offset-l;if(t<0||t+e.size>a.byteLength)throw Error("[MP4Demuxer] Incomplete GOP data");return{data:a.slice(t,t+e.size),timestampUs:e.cts/e.timescale*1e6,durationUs:e.duration/e.timescale*1e6,isSync:e.is_sync}})}async fetchUntilReady(e,t,i){let s=(0,n.l)(this.url)||this.url,a=0,l=(null==i?void 0:i.metadataOnly)?4:64;for(let n=0;n<l;n++){let l=a+(0===n?65536:1048576)-1,o=await fetch(s,{headers:{Range:"bytes=".concat(a,"-").concat(l)},...(null==i?void 0:i.signal)&&{signal:i.signal}});if(416===o.status)break;if(!o.ok&&206!==o.status)throw Error("[MP4Demuxer] Fetch failed: ".concat(o.status," ").concat(o.statusText));if((null==i?void 0:i.metadataOnly)&&200===o.status){var r;throw await (null==(r=o.body)?void 0:r.cancel()),Error("[MP4Demuxer] Metadata range unsupported")}let h=await o.arrayBuffer();if(0===h.byteLength)break;h.fileStart=200===o.status?0:a;let d=e.appendBuffer(h);if(t())return;if(200===o.status)break;a=Number.isFinite(d)&&d>a?d:a+h.byteLength}throw Error("[MP4Demuxer] moov not found")}constructor(e){this.mp4file=null,this.samples=[],this.gopIndex=[],this.gopCache=new Map,this.loadingGOPs=new Map,this.generation=0,this.initDone=!1,this.config=null,this.url=e}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.